@@ -920,8 +920,8 @@ static LRESULT CALLBACK wnd_proc_common(
920920 /* Seems to be hard to synchronize
921921 * WM_CHAR and WM_KEYDOWN properly.
922922 */
923- input_keyboard_event (true, RETROK_UNKNOWN , wparam , mod ,
924- RETRO_DEVICE_KEYBOARD );
923+ input_keyboard_event (true, RETROK_UNKNOWN ,
924+ wparam , mod , RETRO_DEVICE_KEYBOARD );
925925 }
926926 return TRUE;
927927 case WM_CLOSE :
@@ -1002,15 +1002,15 @@ static LRESULT CALLBACK wnd_proc_common_internal(HWND hwnd,
10021002 mod |= RETROKMOD_META ;
10031003
10041004 input_keyboard_event (keydown , keycode ,
1005- 0 , mod , RETRO_DEVICE_KEYBOARD );
1005+ wparam , mod , RETRO_DEVICE_KEYBOARD );
10061006
10071007 if (message != WM_SYSKEYDOWN )
10081008 return 0 ;
10091009
10101010 if (
1011- wparam == VK_F10 ||
1012- wparam == VK_MENU ||
1013- wparam == VK_RSHIFT
1011+ wparam == VK_F10
1012+ || wparam == VK_MENU
1013+ || wparam == VK_RSHIFT
10141014 )
10151015 return 0 ;
10161016 }
@@ -1047,11 +1047,11 @@ static LRESULT CALLBACK wnd_proc_common_internal(HWND hwnd,
10471047 break ;
10481048#ifdef HAVE_CLIP_WINDOW
10491049 case WM_SETFOCUS :
1050- if (input_state_get_ptr ()-> flags & INP_FLAG_GRAB_MOUSE_STATE )
1050+ if (input_state_get_ptr ()-> flags & INP_FLAG_GRAB_MOUSE_STATE )
10511051 win32_clip_window (true);
10521052 break ;
10531053 case WM_KILLFOCUS :
1054- if (input_state_get_ptr ()-> flags & INP_FLAG_GRAB_MOUSE_STATE )
1054+ if (input_state_get_ptr ()-> flags & INP_FLAG_GRAB_MOUSE_STATE )
10551055 win32_clip_window (false);
10561056 break ;
10571057#endif
@@ -1086,8 +1086,10 @@ static LRESULT CALLBACK wnd_proc_winraw_common_internal(HWND hwnd,
10861086 if (message != WM_SYSKEYDOWN )
10871087 return 0 ;
10881088
1089+ /* keyboard_event in winraw_callback */
1090+
10891091 if (
1090- wparam == VK_F10
1092+ wparam == VK_F10
10911093 || wparam == VK_MENU
10921094 || wparam == VK_RSHIFT
10931095 )
@@ -1124,7 +1126,7 @@ static LRESULT CALLBACK wnd_proc_winraw_common_internal(HWND hwnd,
11241126 break ;
11251127 case WM_SETFOCUS :
11261128#ifdef HAVE_CLIP_WINDOW
1127- if (input_state_get_ptr ()-> flags & INP_FLAG_GRAB_MOUSE_STATE )
1129+ if (input_state_get_ptr ()-> flags & INP_FLAG_GRAB_MOUSE_STATE )
11281130 win32_clip_window (true);
11291131#endif
11301132#if !defined(_XBOX )
@@ -1134,7 +1136,7 @@ static LRESULT CALLBACK wnd_proc_winraw_common_internal(HWND hwnd,
11341136 break ;
11351137 case WM_KILLFOCUS :
11361138#ifdef HAVE_CLIP_WINDOW
1137- if (input_state_get_ptr ()-> flags & INP_FLAG_GRAB_MOUSE_STATE )
1139+ if (input_state_get_ptr ()-> flags & INP_FLAG_GRAB_MOUSE_STATE )
11381140 win32_clip_window (false);
11391141#endif
11401142#if !defined(_XBOX )
@@ -1177,17 +1179,17 @@ static LRESULT CALLBACK wnd_proc_common_dinput_internal(HWND hwnd,
11771179 switch (message )
11781180 {
11791181 case WM_IME_ENDCOMPOSITION :
1180- input_keyboard_event (true, 1 , 0x80000000 , 0 , RETRO_DEVICE_KEYBOARD );
1182+ input_keyboard_event (true, 1 , 0x80000000 , 0 , RETRO_DEVICE_KEYBOARD );
11811183 break ;
11821184 case WM_IME_COMPOSITION :
1183- {
1185+ {
11841186 HIMC hIMC = ImmGetContext (hwnd );
1185- unsigned gcs = lparam & (GCS_COMPSTR |GCS_RESULTSTR );
1187+ unsigned gcs = lparam & (GCS_COMPSTR |GCS_RESULTSTR );
11861188 if (gcs )
11871189 {
11881190 int i ;
11891191 wchar_t wstr [4 ]= {0 ,};
1190- int len1 = ImmGetCompositionStringW (hIMC , gcs , wstr , 4 );
1192+ int len1 = ImmGetCompositionStringW (hIMC , gcs , wstr , 4 );
11911193 wstr [2 ] = wstr [1 ];
11921194 wstr [1 ] = 0 ;
11931195 if ((len1 <= 0 ) || (len1 > 4 ))
@@ -1202,8 +1204,8 @@ static LRESULT CALLBACK wnd_proc_common_dinput_internal(HWND hwnd,
12021204 if (len2 >= 1 && len2 <= 3 )
12031205 {
12041206 if (len2 >= 2 )
1205- utf8 [3 ] = (gcs ) | (gcs >> 4 );
1206- input_keyboard_event (true, 1 , * ((int * )utf8 ), 0 , RETRO_DEVICE_KEYBOARD );
1207+ utf8 [3 ] = (gcs ) | (gcs >> 4 );
1208+ input_keyboard_event (true, 1 , * ((int * )utf8 ), 0 , RETRO_DEVICE_KEYBOARD );
12071209 }
12081210 free (utf8 );
12091211 }
@@ -1251,7 +1253,7 @@ static LRESULT CALLBACK wnd_proc_common_dinput_internal(HWND hwnd,
12511253 mod |= RETROKMOD_META ;
12521254
12531255 input_keyboard_event (keydown , keycode ,
1254- 0 , mod , RETRO_DEVICE_KEYBOARD );
1256+ wparam , mod , RETRO_DEVICE_KEYBOARD );
12551257
12561258 if (message != WM_SYSKEYDOWN )
12571259 return 0 ;
0 commit comments