Skip to content
Snippets Groups Projects
Commit c2b24494 authored by dg's avatar dg
Browse files

oups

git-svn-id: http://svn.net-core.org/repos/t-engine4@4947 51575b47-30f0-44d4-a5cc-537603b46e54
parent 915efe09
No related branches found
No related tags found
No related merge requests found
......@@ -1797,9 +1797,9 @@ static int sdl_set_window_size(lua_State *L)
{
int w = luaL_checknumber(L, 1);
int h = luaL_checknumber(L, 2);
int fullscreen = lua_tonumber(L, 3);
bool fullscreen = lua_toboolean(L, 3);
printf("Setting resolution to %dx%d (%s)\n", w, h, (fullscreen == 2) ? "fakefull" : ((fullscreen) ? "fullscreen" : "windowed");
printf("Setting resolution to %dx%d (%s)\n", w, h, fullscreen ? "fullscreen" : "windowed");
do_resize(w, h, fullscreen);
lua_pushboolean(L, TRUE);
......
......@@ -743,7 +743,7 @@ void do_resize(int w, int h, bool fullscreen)
if (!window)
{
window = SDL_CreateWindow("TE4", 0, 0, w, h, SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS);
window = SDL_CreateWindow("TE4", 0, 0, w, h, SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | (fullscreen ? SDL_WINDOW_FULLSCREEN : 0));
if (window==NULL) {
printf("error opening screen: %s\n", SDL_GetError());
exit(1);
......
......@@ -34,7 +34,7 @@
#endif
extern int resizeWindow(int width, int height);
extern void do_resize(int w, int h, int fullscreen);
extern void do_resize(int w, int h, bool fullscreen);
extern void setupRealtime(float freq);
extern void setupDisplayTimer(int fps);
extern int docall (lua_State *L, int narg, int nret);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment