Update of /cvsroot/arcem/arcem/amiga In directory vz-cvs-4.sog:/tmp/cvs-serv7919/amiga
Modified Files: wb.c DispKbd.c platform.h ArcEm.guide Log Message: Only use the WB monitor. Tooltype ANYMONITOR overrides Index: ArcEm.guide =================================================================== RCS file: /cvsroot/arcem/arcem/amiga/ArcEm.guide,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ArcEm.guide 12 May 2012 17:34:51 -0000 1.9 +++ ArcEm.guide 25 Oct 2012 18:34:37 -0000 1.10 @@ -40,6 +40,8 @@ SWAPMOUSEBUTTONS: Swaps MMB and RMB, most useful to allow two button mice to get into RISC OS menus. NOCONSOLEOUTPUT: Stops console output. + +ANYMONITOR: Allow ArcEm to open screens on any monitor, not just the one Workbench is using. @endnode @node ARexx Index: platform.h =================================================================== RCS file: /cvsroot/arcem/arcem/amiga/platform.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- platform.h 12 May 2012 17:34:51 -0000 1.7 +++ platform.h 25 Oct 2012 18:34:37 -0000 1.8 @@ -40,4 +40,5 @@ int force8bit; int swapmousebuttons; +BOOL anymonitor; #endif Index: wb.c =================================================================== RCS file: /cvsroot/arcem/arcem/amiga/wb.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- wb.c 12 May 2012 17:34:51 -0000 1.5 +++ wb.c 25 Oct 2012 18:34:37 -0000 1.6 @@ -43,6 +43,7 @@ force8bit = 0; swapmousebuttons = 0; + anymonitor = FALSE; if((*wbarg->wa_Name) && (dobj=GetDiskObject(wbarg->wa_Name))) { @@ -134,8 +135,8 @@ } if(FindToolType(toolarray,"FORCE8BIT")) force8bit=1; - if(FindToolType(toolarray,"SWAPBUTTONS")) swapmousebuttons=1; + if(FindToolType(toolarray,"ANYMONITOR")) anymonitor = TRUE; if(FindToolType(toolarray, "USEUPDATEFLAGS")) DisplayDev_UseUpdateFlags = 1; Index: DispKbd.c =================================================================== RCS file: /cvsroot/arcem/arcem/amiga/DispKbd.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- DispKbd.c 21 Oct 2012 16:59:31 -0000 1.17 +++ DispKbd.c 25 Oct 2012 18:34:37 -0000 1.18 @@ -14,7 +14,6 @@ #include "arexx.h" #include "../armemu.h" #include "arch/displaydev.h" -#include "ControlPane.h" #include <proto/intuition.h> #include <intuition/pointerclass.h> @@ -55,6 +54,8 @@ static int redraw_miny = INT_MAX; static int redraw_maxy = 0; +static ULONG monitor_tag = TAG_IGNORE; +static ULONG monitor_data = TAG_IGNORE; void writepixel(struct RastPort *,ULONG,ULONG,ULONG); void ChangeDisplayMode(ARMul_State *,long,long,int); @@ -74,7 +75,8 @@ if((width<=0) || (height <= 0) || (log2bpp < 0)) { - ControlPane_Error(EXIT_FAILURE,"Invalid mode\n"); + printf("-> Invalid mode\n"); + exit(EXIT_FAILURE); } *xscale = 1; @@ -105,6 +107,7 @@ BIDTAG_DesiredWidth,width, BIDTAG_DesiredHeight,height, BIDTAG_Depth,1<<log2bpp, + monitor_tag, monitor_data, TAG_DONE); if(id == INVALID_ID) @@ -160,12 +163,14 @@ } else { - ControlPane_Error(EXIT_FAILURE,"Failed to create screen\n"); + printf("-> Failed to create screen\n"); + exit(EXIT_FAILURE); } if(!window) { - ControlPane_Error(EXIT_FAILURE,"Failed to create window\n"); + printf("-> Failed to create window\n"); + exit(EXIT_FAILURE); } PubScreenStatus(screen,0); @@ -864,6 +869,8 @@ { /* Setup display and cursor bitmaps */ + struct Screen *wb = NULL; + /* Need to add some error messages here, although if these aren't available you have bigger problems */ #ifdef __amigaos4__ @@ -911,7 +918,15 @@ InitRastPort(&mouse_rp); InitRastPort(&friend); mask = AllocRaster(32,32); - + + if(anymonitor == FALSE) { + if(wb = LockPubScreen(NULL)) { + monitor_tag = BIDTAG_MonitorID; + monitor_data = GetVPModeID(&wb->ViewPort) & MONITOR_ID_MASK; + UnlockPubScreen(NULL, wb); + } + } + /* blank mouse pointer image */ mouseptr.BitMap = AllocBitMap(1,1,1,BMF_CLEAR,NULL); mouseobj = NewObject(NULL,"pointerclass",POINTERA_BitMap,mouseptr.BitMap,POINTERA_WordWidth,2,POINTERA_XOffset,0,POINTERA_YOffset,0,POINTERA_XResolution,POINTERXRESN_SCREENRES,POINTERA_YResolution,POINTERYRESN_SCREENRESASPECT,TAG_DONE); ------------------------------------------------------------------------------ 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