mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-30 10:58:07 +03:00
Crash fix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user