projects
/
vrfileman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed scale in VR
[vrfileman]
/
src
/
main.cc
diff --git
a/src/main.cc
b/src/main.cc
index
942db47
..
04f8523
100644
(file)
--- 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_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;
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_msec = app_get_msec();
+ time_sec = (double)time_msec / 1000.0;
while(SDL_PollEvent(&ev)) {
process_event(&ev);
if(quit) goto break_evloop;
while(SDL_PollEvent(&ev)) {
process_event(&ev);
if(quit) goto break_evloop;
@@
-72,6
+73,16
@@
break_evloop:
return 0;
}
return 0;
}
+void app_resize(int x, int y)
+{
+ SDL_SetWindowSize(win, x, y);
+}
+
+void app_fullscreen(bool fs)
+{
+ SDL_SetWindowFullscreen(win, fs ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
+}
+
void app_quit()
{
quit = true;
void app_quit()
{
quit = true;