first working build

This commit is contained in:
Martin Felis
2013-12-08 01:10:14 +01:00
parent e754a35421
commit 453032fbdb
8 changed files with 16 additions and 154 deletions
+1 -27
View File
@@ -28,9 +28,6 @@
#include <vector>
#include <algorithm>
#include "libraries/glad/gladfuncs.hpp"
using namespace glad;
namespace love
{
namespace window
@@ -98,27 +95,6 @@ bool Window::setWindow(int width, int height, WindowAttributes *attribs)
Uint32 sdlflags = SDL_WINDOW_OPENGL;
#ifdef __ANDROID__
f.fullscreen = true;
f.resizable = false;
if (window) {
int query_width, query_height;
SDL_GetWindowSize (window, &query_width, &query_height);
SDL_Log ("Overriding windows size to = %d,%d", query_width, query_height);
width = query_width;
height = query_height;
} else {
SDL_DisplayMode mode = {};
SDL_GetDesktopDisplayMode(f.display, &mode);
SDL_Log ("Overriding windows size to = %d,%d", mode.w, mode.h);
width = mode.w;
height = mode.h;
}
#endif
if (f.fullscreen)
{
@@ -130,10 +106,8 @@ bool Window::setWindow(int width, int height, WindowAttributes *attribs)
// Fullscreen window creation will bug out if no mode can be used.
SDL_DisplayMode mode = {0, width, height, 0, 0};
if (SDL_GetClosestDisplayMode(f.display, &mode, &mode) == 0) {
displayError ("SDL", "Could not get closest display mode");
if (SDL_GetClosestDisplayMode(f.display, &mode, &mode) == 0)
return false;
}
}
}