Permalink
Browse files

SDL2: Fix video updating to work as it does for SDL1, to fully refres…

…h the screen after mode change and update relative portions properly
  • Loading branch information...
joncampbell123 committed Jul 12, 2018
1 parent 4acc780 commit c5b51ead326dc90abf3c8c7b635945c580e3340e
Showing with 13 additions and 6 deletions.
  1. +6 −2 src/output/output_surface.cpp
  2. +4 −1 src/output/output_surface_sdl2.cpp
  3. +3 −3 vs2015/config_package.h
@@ -174,12 +174,16 @@ void OUTPUT_SURFACE_EndUpdate(const Bit16u *changedLines)
if (changedLines && (changedLines[0] == sdl.draw.height))
return;
if (!menu.hidecycles && !sdl.desktop.fullscreen) frames++;
#if !defined(C_SDL2)
#if defined(C_SDL2)
SDL_UpdateWindowSurface(sdl.window);
#else
SDL_Flip(sdl.surface);
#endif
}
else if (sdl.must_redraw_all) {
#if !defined(C_SDL2)
#if defined(C_SDL2)
if (changedLines != NULL) SDL_UpdateWindowSurface(sdl.window);
#else
if (changedLines != NULL) SDL_Flip(sdl.surface);
#endif
}
@@ -72,6 +72,10 @@ Bitu OUTPUT_SURFACE_SetSize()
retFlags = GFX_CAN_32;
break;
}
sdl.deferred_resize = false;
sdl.must_redraw_all = true;
/* Fix a glitch with aspect=true occuring when
changing between modes with different dimensions */
SDL_FillRect(sdl.surface, NULL, SDL_MapRGB(sdl.surface->format, 0, 0, 0));
@@ -81,7 +85,6 @@ Bitu OUTPUT_SURFACE_SetSize()
mainMenu.setRedraw();
GFX_DrawSDLMenu(mainMenu, mainMenu.display_list);
#endif
SDL_UpdateWindowSurface(sdl.window);
return retFlags;
}
@@ -1,8 +1,8 @@
#define PACKAGE "dosbox-x"
#define PACKAGE_BUGREPORT "https://github.com/joncampbell123/dosbox-x/issues"
#define PACKAGE_NAME "dosbox-x"
#define PACKAGE_STRING "dosbox-x 0.82.4"
#define PACKAGE_STRING "dosbox-x 0.82.8"
#define PACKAGE_TARNAME "dosbox-x"
#define PACKAGE_URL "http://dosbox-x.software"
#define PACKAGE_VERSION "0.82.4"
#define VERSION "0.82.4"
#define PACKAGE_VERSION "0.82.8"
#define VERSION "0.82.8"

0 comments on commit c5b51ea

Please sign in to comment.