[Scummvm-cvs-logs] CVS: scummvm/backends/wince pocketpc.cpp,1.15,1.16
Nicolas Bacca
arisme at users.sourceforge.net
Sun Dec 1 16:43:29 CET 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm README,1.47,1.48
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/gp32/h defines.h,1.1,NONE gpdef.h,1.1,NONE gpfont.h,1.1,NONE gpfont_port.h,1.1,NONE gpfontres.dat,1.1,NONE gpgraphic.h,1.1,NONE gpmem.h,1.1,NONE gpmm.h,1.1,NONE gpos_def.h,1.1,NONE gpsockdef.h,1.1,NONE gpstdio.h,1.1,NONE gpstdlib.h,1.1,NONE initval_port.h,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/backends/wince
In directory sc8-pr-cvs1:/tmp/cvs-serv2982a
Modified Files:
pocketpc.cpp
Log Message:
Fix keycode + make sound thread priority a configuration parameter (SoundThreadPriority, 1=Highest, 2=Above Normal, 3=Normal, 4=Below Normal) - requires linking with a new SDLAudio that will be posted on http://arisme.free.fr/PocketScumm
Index: pocketpc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/pocketpc.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- pocketpc.cpp 1 Dec 2002 23:46:19 -0000 1.15
+++ pocketpc.cpp 2 Dec 2002 00:42:40 -0000 1.16
@@ -188,6 +188,8 @@
int _pseudoGAPI_device;
+int _thread_priority;
+
extern char noGAPI;
/* Default SDLAUDIO */
@@ -706,7 +708,7 @@
int version;
int result;
bool need_rescan = false;
-
+
HMODULE aygshell_handle;
//HMODULE SDLAudio_handle;
HMODULE GAPI_handle;
@@ -816,6 +818,17 @@
if (!version || version != CURRENT_GAMES_VERSION)
need_rescan = true;
+ _thread_priority = g_config->getInt("SoundThreadPriority", -1, "wince");
+ if (_thread_priority < 0) {
+#ifdef SH3
+ _thread_priority = THREAD_PRIORITY_NORMAL;
+#else
+ _thread_priority = THREAD_PRIORITY_ABOVE_NORMAL;
+#endif
+ g_config->setInt("SoundThreadPriority", _thread_priority, "wince");
+ g_config->flush();
+ }
+
select_game = true;
/* Create the main window */
@@ -1090,7 +1103,7 @@
if (!processAction(GAPIKeysTranslate((unsigned int)(wParam))))
/*else*/ {
wm->_event.kbd.ascii = mapKey(wParam);
- wm->_event.kbd.keycode = mapKey(wParam);
+ wm->_event.kbd.keycode = tolower(wm->_event.kbd.ascii);
wm->_event.event_code = EVENT_KEYDOWN;
}
}
@@ -1162,7 +1175,7 @@
wm->_event.kbd.ascii =
(y <= (220 + offset_y)? KEYBOARD_MAPPING_ALPHA_HIGH[((x + 10) / 14) - 1] :
KEYBOARD_MAPPING_ALPHA_LOW[((x + 10) / 14) - 1]);
- wm->_event.kbd.keycode = wm->_event.kbd.ascii;
+ wm->_event.kbd.keycode = tolower(wm->_event.kbd.ascii);
break;
}
else
@@ -1877,6 +1890,7 @@
desired.samples = 128;
desired.callback = own_soundProc;
desired.userdata = param;
+ desired.thread_priority = _thread_priority;
if (SDL_OpenAudio(&desired, NULL) != 0) {
return false;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm README,1.47,1.48
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/gp32/h defines.h,1.1,NONE gpdef.h,1.1,NONE gpfont.h,1.1,NONE gpfont_port.h,1.1,NONE gpfontres.dat,1.1,NONE gpgraphic.h,1.1,NONE gpmem.h,1.1,NONE gpmm.h,1.1,NONE gpos_def.h,1.1,NONE gpsockdef.h,1.1,NONE gpstdio.h,1.1,NONE gpstdlib.h,1.1,NONE initval_port.h,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list