X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrfileman;a=blobdiff_plain;f=src%2Fmain.cc;h=ae84abdafb04c1f189d17a2fc0637c65f7dc02c5;hp=942db477141fc07d4bb152d45d8224c147d87fa6;hb=f19edacadfd124dae0d6666a86fb1b6ca4df8969;hpb=dd39621d642e417f1e343cbf813205a658272639 diff --git a/src/main.cc b/src/main.cc index 942db47..ae84abd 100644 --- a/src/main.cc +++ b/src/main.cc @@ -18,7 +18,7 @@ int main(int argc, char **argv) } SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); - SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 1); + SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4); SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1); int x = SDL_WINDOWPOS_UNDEFINED; @@ -55,6 +55,7 @@ int main(int argc, char **argv) } time_msec = app_get_msec(); + time_sec = (double)time_msec / 1000.0; while(SDL_PollEvent(&ev)) { process_event(&ev); if(quit) goto break_evloop; @@ -72,6 +73,16 @@ break_evloop: return 0; } +void app_resize(int x, int y) +{ + SDL_SetWindowSize(win, x, y); +} + +void app_fullscreen(int fs) +{ + SDL_SetWindowFullscreen(win, fs ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); +} + void app_quit() { quit = true;