Crash fix

This commit is contained in:
kichikuou
2016-04-02 17:46:31 +09:00
parent b716e76734
commit 4be0695ec3
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
SDL_CFLAGS := $(shell sdl2-config --cflags)
SDL_LFLAGS := -lSDL2_ttf $(shell sdl2-config --libs)
CXXFLAGS = -Isrc -Isrc/sys -D_SYSTEM3 -D_DEBUG_CONSOLE -MMD $(SDL_CFLAGS)
CXXFLAGS = -Isrc -Isrc/sys -D_SYSTEM3 -D_DEBUG_CONSOLE -MMD $(SDL_CFLAGS) -g
LIBS = -lfreetype -lharfbuzz -lglib-2.0 -lpng -lbz2 -lz -lintl -liconv \
-luuid -limm32 -lole32 -loleaut32 -lversion -lgdi32 -lgdiplus -lwinmm -lws2_32
+2
View File
@@ -453,6 +453,8 @@ void AGS::invalidate_screen(int sx, int sy, int width, int height)
{
SDL_UnlockSurface(hBmpDest);
uint32* pixels = surface_line(hBmpDest, screen_height == 400 ? sy + (scroll - 400) : sy) + sx;
if (sy + height > screen_height)
height = screen_height - sy;
SDL_Rect rect = {sx, sy, width, height};
SDL_UpdateTexture(sdlTexture, &rect, pixels, hBmpDest->pitch);
SDL_RenderClear(sdlRenderer);