diff --git a/source/Applewin.cpp b/source/Applewin.cpp index 6e40438f..c95bb52f 100644 --- a/source/Applewin.cpp +++ b/source/Applewin.cpp @@ -253,7 +253,6 @@ void ContinueExecution(void) if (g_bFullSpeed) { - // For IBIZA.DSK VideoRedrawScreenDuringFullSpeed(g_dwCyclesThisFrame); } diff --git a/source/Frame.cpp b/source/Frame.cpp index 3c5d83b0..6ea59283 100644 --- a/source/Frame.cpp +++ b/source/Frame.cpp @@ -68,7 +68,7 @@ static const int kDEFAULT_VIEWPORT_SCALE = 2; int g_nViewportCX = FRAMEBUFFER_BORDERLESS_W * kDEFAULT_VIEWPORT_SCALE; int g_nViewportCY = FRAMEBUFFER_BORDERLESS_H * kDEFAULT_VIEWPORT_SCALE; static int g_nViewportScale = kDEFAULT_VIEWPORT_SCALE; // saved REGSAVE -static int g_nMaxViewportScale = kDEFAULT_VIEWPORT_SCALE; +static int g_nMaxViewportScale = kDEFAULT_VIEWPORT_SCALE; // Max scale in Windowed mode with borders, buttons etc (full-screen may be +1) #define BUTTONX (g_nViewportCX + VIEWPORTX*2) #define BUTTONY 0 @@ -2106,9 +2106,10 @@ void SetFullScreenMode () MONITORINFO monitor_info; FULLSCREEN_SCALE_TYPE width, height, scalex, scaley; - int top, left, A2_WINDOW_WIDTH, A2_WINDOW_HEIGHT; + int top, left; - GetWidthHeight(A2_WINDOW_WIDTH, A2_WINDOW_HEIGHT); + const int A2_WINDOW_WIDTH = FRAMEBUFFER_BORDERLESS_W; + const int A2_WINDOW_HEIGHT = FRAMEBUFFER_BORDERLESS_H; buttonover = -1; #if 0 @@ -2141,7 +2142,7 @@ void SetFullScreenMode () #if 1 // FS: desktop - SetViewportScale(g_win_fullscreen_scale); + SetViewportScale(g_win_fullscreen_scale, true); buttonx = g_win_fullscreen_offsetx + g_nViewportCX + VIEWPORTX*2; buttony = g_win_fullscreen_offsety; @@ -2261,9 +2262,9 @@ int GetViewportScale(void) return g_nViewportScale; } -int SetViewportScale(int nNewScale) +int SetViewportScale(int nNewScale, bool bForce /*=false*/) { - if (nNewScale > g_nMaxViewportScale) + if (!bForce && nNewScale > g_nMaxViewportScale) nNewScale = g_nMaxViewportScale; g_nViewportScale = nNewScale; diff --git a/source/Frame.h b/source/Frame.h index 171ccd26..7ded8b69 100644 --- a/source/Frame.h +++ b/source/Frame.h @@ -74,7 +74,7 @@ extern int g_win_fullscreen_offsety; void FrameReleaseVideoDC (); void FrameSetCursorPosByMousePos(); int GetViewportScale(void); - int SetViewportScale(int nNewScale); + int SetViewportScale(int nNewScale, bool bForce = false); void GetViewportCXCY(int& nViewportCX, int& nViewportCY); bool GetFullScreen32Bit(void); void SetFullScreen32Bit(bool b32Bit); diff --git a/source/Video.cpp b/source/Video.cpp index ff200ccc..b2f256dd 100644 --- a/source/Video.cpp +++ b/source/Video.cpp @@ -1103,10 +1103,6 @@ void VideoDisplayLogo () void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInvalidate /*=false*/) { static bool bValid = false; - static BYTE text_main[1024*2] = {0}; // page1 & 2 - static BYTE text_aux[1024*2] = {0}; // page1 & 2 - static BYTE hgr_main[8192*2] = {0}; // page1 & 2 - static BYTE hgr_aux[8192*2] = {0}; // page1 & 2 if (bInvalidate) { @@ -1114,6 +1110,13 @@ void VideoRedrawScreenDuringFullSpeed(DWORD dwCyclesThisFrame, bool bInvalidate return; } + // + + static BYTE text_main[1024*2] = {0}; // page1 & 2 + static BYTE text_aux[1024*2] = {0}; // page1 & 2 + static BYTE hgr_main[8192*2] = {0}; // page1 & 2 + static BYTE hgr_aux[8192*2] = {0}; // page1 & 2 + bool bRedraw = true; // Always redraw for bValid==false (ie. just entered full-speed mode) if (bValid)