diff options
author | darkvater <darkvater@openttd.org> | 2004-11-14 12:37:23 +0000 |
---|---|---|
committer | darkvater <darkvater@openttd.org> | 2004-11-14 12:37:23 +0000 |
commit | 8946e92468db588a1a0d39da2b9a53523e091d10 (patch) | |
tree | 845a99748fd90e9810f4da21a9b01f0f6534a515 /win32.c | |
parent | 989289faddc4b1f7dee97defb7d80e6d1cea0465 (diff) | |
download | openttd-8946e92468db588a1a0d39da2b9a53523e091d10.tar.xz |
(svn r586) -Fix: [1066114] Code error in win32.c Thanks Shai
-Fix: ttd.vcproj change to hard-set compilation as C, as well as adding WITH_SDL to debug mode. If you don't have SDL just remove that.
Diffstat (limited to 'win32.c')
-rw-r--r-- | win32.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -284,27 +284,26 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return 0; } - case WM_KEYDOWN: - { + case WM_KEYDOWN: { // this is the rewritten ascii input function // it disables windows deadkey handling --> more linux like :D - unsigned short w = 0; + unsigned short w = 0; int r = 0; byte ks[256]; - unsigned int scan=0; + unsigned int scan = 0; GetKeyboardState(ks); - r=ToAscii(wParam,scan,ks,&w,0); - if (r=0) w=0; + r = ToAscii(wParam, scan, ks, &w, 0); + if (r == 0) w = 0; // no translation was possible _pressed_key = w | MapWindowsKey(wParam) << 16; - } + if ((_pressed_key>>16) == ('D' | WKC_CTRL) && !_wnd.fullscreen) { _double_size ^= 1; _wnd.double_size = _double_size; ClientSizeChanged(_wnd.width, _wnd.height); MarkWholeScreenDirty(); } - break; + } break; case WM_SYSKEYDOWN: /* user presses F10 or Alt, both activating the title-menu */ |