Update of /cvsroot/arcem/arcem/amiga In directory vz-cvs-4.sog:/tmp/cvs-serv13637/amiga
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/amiga/ControlPane.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ControlPane.c 12 May 2012 17:34:51 -0000 1.3 +++ ControlPane.c 21 Oct 2012 16:59:31 -0000 1.4 @@ -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/amiga/DispKbd.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- DispKbd.c 12 May 2012 17:34:51 -0000 1.16 +++ DispKbd.c 21 Oct 2012 16:59:31 -0000 1.17 @@ -14,6 +14,7 @@ #include "arexx.h" #include "../armemu.h" #include "arch/displaydev.h" +#include "ControlPane.h" #include <proto/intuition.h> #include <intuition/pointerclass.h> @@ -73,8 +74,7 @@ if((width<=0) || (height <= 0) || (log2bpp < 0)) { - printf("-> Invalid mode\n"); - exit(EXIT_FAILURE); + ControlPane_Error(EXIT_FAILURE,"Invalid mode\n"); } *xscale = 1; @@ -160,14 +160,12 @@ } else { - printf("-> Failed to create screen\n"); - exit(EXIT_FAILURE); + ControlPane_Error(EXIT_FAILURE,"Failed to create screen\n"); } if(!window) { - printf("-> Failed to create window\n"); - exit(EXIT_FAILURE); + ControlPane_Error(EXIT_FAILURE,"Failed to create window\n"); } PubScreenStatus(screen,0); ------------------------------------------------------------------------------ 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 arcem-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/arcem-cvs