src/video/nanox/SDL_nxwm.c
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
equal deleted inserted replaced
1667:1fddae038bc8 1668:4da1ee79c9af
    29 #include "../../events/SDL_events_c.h"
    29 #include "../../events/SDL_events_c.h"
    30 
    30 
    31 #include "SDL_nxwm_c.h"
    31 #include "SDL_nxwm_c.h"
    32 
    32 
    33 void
    33 void
    34 NX_SetCaption (_THIS, const char *title, const char *icon)
    34 NX_SetCaption(_THIS, const char *title, const char *icon)
    35 {
    35 {
    36     Dprintf ("enter NX_SetCaption\n");
    36     Dprintf("enter NX_SetCaption\n");
    37 
    37 
    38     // Lock the event thread, in multi-threading environments
    38     // Lock the event thread, in multi-threading environments
    39     SDL_Lock_EventThread ();
    39     SDL_Lock_EventThread();
    40 
    40 
    41     if (SDL_Window)
    41     if (SDL_Window)
    42         GrSetWindowTitle (SDL_Window, title);
    42         GrSetWindowTitle(SDL_Window, title);
    43 
    43 
    44     SDL_Unlock_EventThread ();
    44     SDL_Unlock_EventThread();
    45     Dprintf ("leave NX_SetCaption\n");
    45     Dprintf("leave NX_SetCaption\n");
    46 }
    46 }
    47 
    47 
    48 int
    48 int
    49 NX_GetWMInfo (_THIS, SDL_SysWMinfo * info)
    49 NX_GetWMInfo(_THIS, SDL_SysWMinfo * info)
    50 {
    50 {
    51     Dprintf ("enter NX_GetWMInfo\n");
    51     Dprintf("enter NX_GetWMInfo\n");
    52 
    52 
    53     if (info->version.major <= SDL_MAJOR_VERSION) {
    53     if (info->version.major <= SDL_MAJOR_VERSION) {
    54         info->window = SDL_Window;
    54         info->window = SDL_Window;
    55         return 1;
    55         return 1;
    56     } else {
    56     } else {
    57         SDL_SetError ("Application not compiled with SDL %d.%d\n",
    57         SDL_SetError("Application not compiled with SDL %d.%d\n",
    58                       SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
    58                      SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
    59         return -1;
    59         return -1;
    60     }
    60     }
    61 
    61 
    62     Dprintf ("leave NX_GetWMInfo\n");
    62     Dprintf("leave NX_GetWMInfo\n");
    63 }
    63 }
    64 
    64 
    65 /* vi: set ts=4 sw=4 expandtab: */
    65 /* vi: set ts=4 sw=4 expandtab: */