1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-04-27 02:51:23 +00:00

added missing guards

This commit is contained in:
Zeno Rogue
2021-02-07 18:29:49 +01:00
parent be44d4d2d6
commit b166b64006
6 changed files with 30 additions and 4 deletions

View File

@@ -169,10 +169,10 @@ void loadfont(int siz) {
#if !ISFAKEMOBILE && !ISANDROID & !ISIOS
int textwidth(int siz, const string &str) {
fix_font_size(siz);
if(isize(str) == 0) return 0;
#if CAP_SDLTTF
fix_font_size(siz);
loadfont(siz);
int w, h;
@@ -1131,10 +1131,12 @@ EX void setvideomode() {
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1);
vid.current_vsync = want_vsync();
#if !ISMOBWEB
if(vid.current_vsync)
SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 1 );
else
SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 0 );
#endif
if(vid.antialias & AA_MULTI) {
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, (vid.antialias & AA_MULTI16) ? 16 : 4);