Commit 72e92ec3 authored by Kiste's avatar Kiste
Browse files

Fixes

parent 6f19dd6f
project('libbulletml', 'c', 'cpp')
project('Noiz2sa', 'c', 'cpp')
subdir('src')
install_data('noiz2sa.desktop', install_dir : join_paths(get_option('datadir'), 'applications'))
......
......@@ -76,7 +76,6 @@ void loadPreference() {
FILE *fp;
int i, j;
int version;
printf("Loading from %s\n", getPrefPath());
if ( NULL == (fp = fopen(getPrefPath(),"rb")) ) {
initHiScore();
return;
......
......@@ -159,7 +159,10 @@ void initSDL(int window, int scaling) {
fprintf(stderr, "Unable to create SDL renderer: %s\n", SDL_GetError());
exit(EXIT_FAILURE);
}
SDL_RenderSetLogicalSize(sdlRenderer, SCREEN_WIDTH, SCREEN_HEIGHT);
if ( SDL_RenderSetLogicalSize(sdlRenderer, SCREEN_WIDTH, SCREEN_HEIGHT) < 0) {
fprintf(stderr, "Unable to set SDL renderer logical size: %s\n", SDL_GetError());
exit(EXIT_FAILURE);
}
video = SDL_CreateRGBSurface(0, SCREEN_WIDTH, SCREEN_HEIGHT, 8, 0, 0, 0, 0);
helperSurface = SDL_CreateRGBSurface(0, SCREEN_WIDTH, SCREEN_HEIGHT, 32, 0, 0, 0, 0);
if ( video == NULL || helperSurface == NULL ) {
......@@ -247,6 +250,7 @@ void flipScreen() {
}
SDL_BlitSurface(video, NULL, helperSurface, NULL);
SDL_UpdateTexture(sdlTexture, NULL, helperSurface->pixels, helperSurface->pitch);
SDL_RenderClear(sdlRenderer);
SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, NULL);
SDL_RenderPresent(sdlRenderer);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment