Trying to compile for Win32.
This commit is contained in:
parent
f0b07cb1b5
commit
668d453b3a
1 changed files with 10 additions and 5 deletions
|
|
@ -31,6 +31,10 @@ static struct osk_layout *load_layout(on_screen_keyboard *keyboard, char *layout
|
||||||
static void print_composemap(osk_composenode *composemap, char * sp);
|
static void print_composemap(osk_composenode *composemap, char * sp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define wcstok(line, delim, pointer) wcstok(line, delim)
|
||||||
|
#endif
|
||||||
|
|
||||||
struct osk_keyboard *osk_create(char *layout_name, SDL_Surface *canvas, SDL_Surface *button_up, SDL_Surface *button_down, SDL_Surface *button_off, SDL_Surface *button_nav, SDL_Surface *button_hold, int disable_change)
|
struct osk_keyboard *osk_create(char *layout_name, SDL_Surface *canvas, SDL_Surface *button_up, SDL_Surface *button_down, SDL_Surface *button_off, SDL_Surface *button_nav, SDL_Surface *button_hold, int disable_change)
|
||||||
{
|
{
|
||||||
SDL_Surface *surface;
|
SDL_Surface *surface;
|
||||||
|
|
@ -187,8 +191,8 @@ static struct osk_layout *load_layout(on_screen_keyboard *keyboard, char *layout
|
||||||
|
|
||||||
else if (strncmp("keyboardlist", key, 12) == 0)
|
else if (strncmp("keyboardlist", key, 12) == 0)
|
||||||
{
|
{
|
||||||
char * pointer; strtok_r(line, " \t", &pointer);
|
strcpy(value, &line[13]);
|
||||||
keyboard->keyboard_list = strdup( pointer);
|
keyboard->keyboard_list = strdup(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("key %s, value %s\n", key, value);
|
printf("key %s, value %s\n", key, value);
|
||||||
|
|
@ -718,8 +722,9 @@ static void load_keysymdefs(osk_layout *layout, char * keysymdefs_name)
|
||||||
|
|
||||||
/* Some keysyms doesn't correspond to any unicode value, ej. BackSpace */
|
/* Some keysyms doesn't correspond to any unicode value, ej. BackSpace */
|
||||||
layout->keysymdefs[i].unicode = 0;
|
layout->keysymdefs[i].unicode = 0;
|
||||||
sscanf(line, "#define XK_%ms %x /* U+%x",
|
layout->keysymdefs[i].mnemo = malloc(128);
|
||||||
&layout->keysymdefs[i].mnemo,
|
sscanf(line, "#define XK_%s %x /* U+%x",
|
||||||
|
layout->keysymdefs[i].mnemo,
|
||||||
&layout->keysymdefs[i].keysym,
|
&layout->keysymdefs[i].keysym,
|
||||||
&layout->keysymdefs[i].unicode);
|
&layout->keysymdefs[i].unicode);
|
||||||
i++;
|
i++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue