return retval;
}
+#ifndef __MINGW32__ // FIXME: Temporary workaround for GL-8
static void GLAPIENTRY glDeleteTextures_doNothing(GLsizei n, const GLuint *textures)
{
// no-op.
}
+#endif // __MINGW32__
#ifdef MessageBox
#undef MessageBox
}
}
-static void toggleFullscreen()
+void toggleFullscreen()
{
+ fullscreen = !fullscreen;
Uint32 flags = SDL_GetWindowFlags(sdlwindow);
if (flags & SDL_WINDOW_FULLSCREEN) {
flags &= ~SDL_WINDOW_FULLSCREEN;
Boolean SetUp ()
{
- char string[10];
-
LOGFUNC;
osx = 0;
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1);
Uint32 sdlflags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;
- if (!cmdline("windowed"))
+ if ((fullscreen || cmdline("fullscreen")) && !cmdline("windowed")) {
+ fullscreen = 1;
sdlflags |= SDL_WINDOW_FULLSCREEN;
+ }
if (!cmdline("nomousegrab"))
sdlflags |= SDL_WINDOW_INPUT_GRABBED;
char *retval;
char *envr;
- const char *ptr = strrchr((char *)argv0, '/');
if (strchr(argv0, '/')) {
retval = strdup(argv0);
if (retval)
png_infop info_ptr = NULL;
png_uint_32 width, height;
int bit_depth, color_type, interlace_type;
- png_byte **rows = NULL;
bool retval = false;
png_byte **row_pointers = NULL;
FILE *fp = fopen(file_name, "rb");
png_byte *dst = tex.data;
for (int i = height - 1; i >= 0; i--) {
png_byte *src = row_pointers[i];
- for (int j = 0; j < width; j++) {
+ for (unsigned j = 0; j < width; j++) {
dst[0] = src[0];
dst[1] = src[1];
dst[2] = src[2];