wow! More clever video handling. Thanks to bug in win version. SDL bug? Or feature?

This commit is contained in:
p.kosyh 2009-09-10 16:58:50 +00:00
parent d552c35ba7
commit 0cda3fde9d
4 changed files with 11 additions and 9 deletions

View file

@ -14,8 +14,8 @@ LUA_LFLAGS=$(shell pkg-config --libs lua5.1)
# for arch linux (may be others) use this
#
# LUA_CFLAGS=$(shell pkg-config --cflags lua)
# LUA_LFLAGS=$(shell pkg-config --libs lua)
LUA_CFLAGS=$(shell pkg-config --cflags lua)
LUA_LFLAGS=$(shell pkg-config --libs lua)
#
SDL_CFLAGS=$(shell sdl-config --cflags)

1
debian/changelog vendored
View file

@ -9,6 +9,7 @@ instead (0.8.9) unstable; urgency=low
* full keyboard control!
* alt enter fix
* gfx cursor support!
* no reset video while change game/theme
-- Peter Kosyh <p.kosyh@gmail.com> Sat, 5 Aug 2009 11:25:01 +0400

View file

@ -484,12 +484,6 @@ int gfx_init(void)
fprintf(stderr, "Can't init TTF subsystem.\n");
return -1;
}
// Initialize SDL
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER /*| SDL_INIT_AUDIO*/) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
return -1;
}
SDL_WM_SetCaption( title, title );
@ -540,7 +534,6 @@ void gfx_done(void)
SDL_RemoveTimer(timer_han);
timer_han = NULL;
TTF_Quit();
SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_TIMER);
}
img_t gfx_scale(img_t src, float xscale, float yscale)

View file

@ -1,3 +1,4 @@
#include <SDL.h>
#include "externals.h"
#include "internals.h"
@ -92,6 +93,12 @@ int main(int argc, char **argv)
game_theme_select(opt_theme);
if (!curtheme_dir)
game_theme_select(DEFAULT_THEME);
// Initialize SDL
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) {
fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError());
return -1;
}
if (game_init(opt_game)) {
game_error(opt_game);
@ -101,6 +108,7 @@ int main(int argc, char **argv)
game_done();
if (debug_sw)
debug_done();
SDL_Quit();
return 0;
}