Update of /cvsroot/arcem/arcem/win
In directory vz-cvs-4.sog:/tmp/cvs-serv13637/win
Modified Files:
ControlPane.c DispKbd.c
Log Message:
* Add ControlPane_Error() function to allow errors to be reported in a
platform-specific way.
* Replace numerous fprintf(stderr,"Foo"); exit(1); calls with calls to
ControlPane_Error()
RISC OS specific changes:
* Add support for running in 32bpp modes (e.g. for Raspberry Pi)
* Allow tweak menu keys to be configured
* Fix stdout redirection preventing tweak menu from being visible!
Index: ControlPane.c
===================================================================
RCS file: /cvsroot/arcem/arcem/win/ControlPane.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ControlPane.c 12 May 2012 17:34:52 -0000 1.4
+++ ControlPane.c 21 Oct 2012 16:59:32 -0000 1.5
@@ -7,7 +7,20 @@
#include "armarc.h"
#include "ControlPane.h"
+#include <stdarg.h>
+#include <stdio.h>
+
void ControlPane_Init(ARMul_State *state)
{
}
+
+void ControlPane_Error(int code,const char *fmt,...)
+{
+ va_list args;
+ va_start(args,fmt);
+ /* Log it */
+ vfprintf(stderr,fmt,args);
+ /* Quit */
+ exit(code);
+}
Index: DispKbd.c
===================================================================
RCS file: /cvsroot/arcem/arcem/win/DispKbd.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- DispKbd.c 21 Jul 2012 01:01:11 -0000 1.19
+++ DispKbd.c 21 Oct 2012 16:59:32 -0000 1.20
@@ -9,6 +9,7 @@
#include "win.h"
#include "KeyTable.h"
#include "../armemu.h"
+#include "ControlPane.h"
#define MonitorWidth 1600
@@ -79,8 +80,7 @@
{
if((width > MonitorWidth) || (height > MonitorHeight))
{
- fprintf(stderr,"Mode %dx%d too big\n",width,height);
- exit(EXIT_FAILURE);
+ ControlPane_Error(EXIT_FAILURE,"Mode %dx%d too big\n",width,height);
}
HD.Width = width;
HD.Height = height;
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
--
arcem-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/arcem-cvs