[Scummvm-cvs-logs] CVS: scummvm/backends/psp osys_psp.cpp,1.2,1.3 osys_psp_gu.cpp,1.4,1.5 psp_main.cpp,1.4,1.5

Joost Peters joostp at users.sourceforge.net
Sun Jan 1 10:26:02 CET 2006


Update of /cvsroot/scummvm/scummvm/backends/psp
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29478

Modified Files:
	osys_psp.cpp osys_psp_gu.cpp psp_main.cpp 
Log Message:
Get rid of an old hack


Index: osys_psp.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/psp/osys_psp.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- osys_psp.cpp	18 Oct 2005 01:30:15 -0000	1.2
+++ osys_psp.cpp	1 Jan 2006 18:25:48 -0000	1.3
@@ -37,7 +37,6 @@
 #define	SCREEN_WIDTH	480
 #define	SCREEN_HEIGHT	272
 
-extern bool g_quit;
 
 unsigned short *DrawBuffer = (unsigned short *)0x44044000;
 unsigned short *DisplayBuffer = (unsigned short *)0x44000000;
@@ -407,15 +406,6 @@
 */
 	uint32 buttonsChanged = pad.Buttons ^ _prevButtons;
 
-	/* check if user exited using the Home button */
-	if (g_quit) {
-		g_quit = false; //set g_quit back to false or else pollEvent keeps looping..
-
-		warning("g_quit signal caught, sending EVENT_QUIT to VM engine");
-		event.type = OSystem::EVENT_QUIT;
-		return true;
-	}
-	
 	if (buttonsChanged & (PSP_CTRL_CROSS | PSP_CTRL_CIRCLE | PSP_CTRL_LTRIGGER | PSP_CTRL_RTRIGGER | PSP_CTRL_START | PSP_CTRL_SELECT | PSP_CTRL_SQUARE)) {
 		if (buttonsChanged & PSP_CTRL_CROSS) {
 			event.type = (pad.Buttons & PSP_CTRL_CROSS) ? OSystem::EVENT_LBUTTONDOWN : OSystem::EVENT_LBUTTONUP;

Index: osys_psp_gu.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/psp/osys_psp_gu.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- osys_psp_gu.cpp	18 Oct 2005 01:30:15 -0000	1.4
+++ osys_psp_gu.cpp	1 Jan 2006 18:25:49 -0000	1.5
@@ -65,7 +65,6 @@
 #define CAPS_LOCK	(1 << 0)
 #define SYMBOLS 	(1 << 1)
 
-extern bool g_quit;
 
 OSystem_PSP_GU::OSystem_PSP_GU() {
 	//sceKernelDcacheWritebackAll();
@@ -484,15 +483,6 @@
 
 	uint32 buttonsChanged = pad.Buttons ^ _prevButtons;
 
-	/* check if user exited using the Home button */
-	if (g_quit) {
-		g_quit = false; //set g_quit back to false or else pollEvent keeps looping..
-
-		warning("g_quit signal caught, sending EVENT_QUIT to VM engine");
-		event.type = OSystem::EVENT_QUIT;
-		return true;
-	}
-	
 	if  ((buttonsChanged & PSP_CTRL_SELECT) || (pad.Buttons & PSP_CTRL_SELECT)) 
 	{
 		if( !(pad.Buttons & PSP_CTRL_SELECT) )

Index: psp_main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/psp/psp_main.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- psp_main.cpp	28 Oct 2005 22:32:03 -0000	1.4
+++ psp_main.cpp	1 Jan 2006 18:25:49 -0000	1.5
@@ -62,8 +62,6 @@
 PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
 #endif
 
-/* global quit flag, this is used to let the VM engine shutdown properly */
-bool g_quit = false;
 
 #ifndef USERSPACE_ONLY
 void MyExceptionHandler(PspDebugRegBlock *regs) {
@@ -94,8 +92,7 @@
 
 /* Exit callback */
 SceKernelCallbackFunction exit_callback(int /*arg1*/, int /*arg2*/, void * /*common*/) {
-	g_quit = true; //Set g_quit so our backend can shutdown the VM
-	sceKernelDelayThread(1000);
+	sceKernelExitGame();
 	return 0;
 }
 





More information about the Scummvm-git-logs mailing list