tweaks
This commit is contained in:
parent
41f4ad6620
commit
9baeb3bd1a
|
@ -40,8 +40,10 @@
|
|||
<Add option="-Wall" />
|
||||
<Add option="-m64" />
|
||||
<Add option="-fexceptions" />
|
||||
<Add option="-pipe" />
|
||||
<Add option="-I$(TARGET_COMPILER_DIR)/lib/wx/include/msw-unicode-static-3.0 -I$(TARGET_COMPILER_DIR)/include/wx-3.0" />
|
||||
<Add option="-D_FILE_OFFSET_BITS=64 -D__WXMSW__ -pipe" />
|
||||
<Add option="-D_FILE_OFFSET_BITS=64" />
|
||||
<Add option="-D__WXMSW__" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-m64" />
|
||||
|
|
|
@ -299,26 +299,33 @@ SDL_Scancode scancode_wx2sdl(wxKeyEvent& event)
|
|||
|
||||
int keysym = event.GetRawKeyCode();
|
||||
|
||||
if (keysym == NoSymbol) {
|
||||
if (keysym == NoSymbol)
|
||||
{
|
||||
return SDL_SCANCODE_UNKNOWN;
|
||||
}
|
||||
|
||||
if (keysym >= GDK_a && keysym <= GDK_z) {
|
||||
return SDL_SCANCODE_A + (keysym - GDK_a);
|
||||
if (keysym >= GDK_a && keysym <= GDK_z)
|
||||
{
|
||||
return (SDL_Scancode)(SDL_SCANCODE_A + (keysym - GDK_a));
|
||||
}
|
||||
if (keysym >= GDK_A && keysym <= GDK_Z) {
|
||||
return SDL_SCANCODE_A + (keysym - GDK_A);
|
||||
if (keysym >= GDK_A && keysym <= GDK_Z)
|
||||
{
|
||||
return (SDL_Scancode)(SDL_SCANCODE_A + (keysym - GDK_A));
|
||||
}
|
||||
|
||||
if (keysym == GDK_0) {
|
||||
if (keysym == GDK_0)
|
||||
{
|
||||
return SDL_SCANCODE_0;
|
||||
}
|
||||
if (keysym >= GDK_1 && keysym <= GDK_9) {
|
||||
return SDL_SCANCODE_1 + (keysym - GDK_1);
|
||||
if (keysym >= GDK_1 && keysym <= GDK_9)
|
||||
{
|
||||
return (SDL_Scancode)(SDL_SCANCODE_1 + (keysym - GDK_1));
|
||||
}
|
||||
|
||||
for (i = 0; i < SDL_arraysize(KeySymToSDLScancode); ++i) {
|
||||
if (keysym == KeySymToSDLScancode[i].keysym) {
|
||||
for (i = 0; i < SDL_arraysize(KeySymToSDLScancode); ++i)
|
||||
{
|
||||
if (keysym == KeySymToSDLScancode[i].keysym)
|
||||
{
|
||||
return KeySymToSDLScancode[i].scancode;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue