Ticket #36070: 3689.diff
File 3689.diff, 2.9 KB (added by domiman@…, 12 years ago) |
---|
-
src/gui/sdl_mapper.cpp
2362 2362 if (!MAPPER_LoadBinds()) CreateDefaultBinds(); 2363 2363 if (SDL_GetModState()&KMOD_CAPS) { 2364 2364 for (CBindList_it bit=caps_lock_event->bindlist.begin();bit!=caps_lock_event->bindlist.end();bit++) { 2365 (*bit)->ActivateBind(32767,true,true);2366 2365 #if SDL_VERSION_ATLEAST(1, 2, 14) 2366 (*bit)->ActivateBind(32767,true,false); 2367 2367 (*bit)->DeActivateBind(false); 2368 #else 2369 (*bit)->ActivateBind(32767,true,true); //Skip the action itself as bios_keyboard.cpp handles the startup state. 2368 2370 #endif 2369 2371 } 2370 2372 } 2371 2373 if (SDL_GetModState()&KMOD_NUM) { 2372 2374 for (CBindList_it bit=num_lock_event->bindlist.begin();bit!=num_lock_event->bindlist.end();bit++) { 2373 (*bit)->ActivateBind(32767,true,true);2374 2375 #if SDL_VERSION_ATLEAST(1, 2, 14) 2376 (*bit)->ActivateBind(32767,true,false); 2375 2377 (*bit)->DeActivateBind(false); 2378 #else 2379 (*bit)->ActivateBind(32767,true,true); 2376 2380 #endif 2377 2381 } 2378 2382 } -
src/gui/sdlmain.cpp
1770 1770 1771 1771 /* Init SDL */ 1772 1772 #if SDL_VERSION_ATLEAST(1, 2, 14) 1773 /* Or debian/ubuntu with older libsdl version as they have done this themselves, but then differently. 1774 * with this variable they will work correctly. I've only tested the 1.2.14 behaviour against the windows version 1775 * of libsdl 1776 */ 1773 1777 putenv(const_cast<char*>("SDL_DISABLE_LOCK_KEYS=1")); 1774 1778 #endif 1775 1779 if ( SDL_Init( SDL_INIT_AUDIO|SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_CDROM -
src/ints/bios_keyboard.cpp
33 33 * Define the following if this is the case */ 34 34 #if SDL_VERSION_ATLEAST(1, 2, 14) 35 35 #define CAN_USE_LOCK 1 36 /* For lower versions of SDL we also use a slight hack to get the startup states of numclock and capslock right. 37 * The proper way is in the mapper, but the repeating key is an unwanted side effect for lower versions of SDL */ 36 38 #endif 37 39 38 40 static Bitu call_int16,call_irq1,call_irq6; … … 592 594 mem_writew(BIOS_KEYBOARD_BUFFER_TAIL,0x1e); 593 595 Bit8u flag1 = 0; 594 596 Bit8u leds = 16; /* Ack recieved */ 595 //MAPPER_Init takes care of this now ? 596 // if(startup_state_capslock) { flag1|=0x40; leds|=0x04;} 597 // if(startup_state_numlock){ flag1|=0x20; leds|=0x02;} 597 598 #if SDL_VERSION_ATLEAST(1, 2, 14) 599 //Nothing, mapper handles all. 600 #else 601 if (startup_state_capslock) { flag1|=0x40; leds|=0x04;} 602 if (startup_state_numlock) { flag1|=0x20; leds|=0x02;} 603 #endif 604 598 605 mem_writeb(BIOS_KEYBOARD_FLAGS1,flag1); 599 606 mem_writeb(BIOS_KEYBOARD_FLAGS2,0); 600 607 mem_writeb(BIOS_KEYBOARD_FLAGS3,16); /* Enhanced keyboard installed */