summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSavely Skresanov <savask@yandex.ru>2012-05-12 11:42:47 (GMT)
committer Savely Skresanov <savask@yandex.ru>2012-05-12 11:45:26 (GMT)
commitda6d5b348aacdfcfbb02f63d3eb39b43378214ed (patch)
tree70ee35b999f8e0f5183e80b8569057eafaa511a9 /src
parent9b8e0280eb0389dd93184d668b3ab853a85fbd67 (diff)
downloadpowder-da6d5b348aacdfcfbb02f63d3eb39b43378214ed.zip
powder-da6d5b348aacdfcfbb02f63d3eb39b43378214ed.tar.gz
Added a GUI error box for window resizing failure.
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 281da0f..73958ba 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -3881,6 +3881,7 @@ void render_cursor(pixel *vid, int x, int y, int t, int rx, int ry)
int sdl_opened = 0;
int sdl_open(void)
{
+ char screen_err = 0;
#ifdef WIN32
SDL_SysWMinfo SysInfo;
HWND WindowHandle;
@@ -4098,6 +4099,7 @@ int sdl_open(void)
if (info->current_w<((XRES+BARSIZE)*sdl_scale) || info->current_h<((YRES+MENUSIZE)*sdl_scale))
{
sdl_scale = 1;
+ screen_err = 1;
fprintf(stderr, "Can't change scale factor, because screen resolution is too small");
}
#ifdef PIX16
@@ -4128,6 +4130,9 @@ int sdl_open(void)
XA_TARGETS = XInternAtom(sdl_wminfo.info.x11.display, "TARGETS", 1);
sdl_wminfo.info.x11.unlock_func();
#endif
+
+ if (screen_err)
+ error_ui(vid_buf, 0, "Can't change scale factor, because screen resolution is too small");
sdl_opened = 1;
return 1;
}