Merge pull request #110 from Clownacy/SDL-fixes

Fixes for the SDL build
This commit is contained in:
ekeeke 2016-10-14 14:29:08 +02:00 committed by GitHub
commit 3332611572
4 changed files with 16 additions and 3 deletions

3
.gitignore vendored
View File

@ -3,3 +3,6 @@ psp2/*.elf
psp2/*.velf
psp2/build_vita/*
psp2/*.a
sdl/gen_sdl
sdl/build_sdl

View File

@ -19,10 +19,14 @@
# -D16BPP_RENDERING - configure for 16-bit pixels (RGB565)
# -D32BPP_RENDERING - configure for 32-bit pixels (RGB888)
ifeq ($(OS),Windows_NT)
NAME = gen_sdl.exe
else
NAME = gen_sdl
endif
CC = gcc
CFLAGS = `sdl-config --cflags` -march=i686 -O6 -fomit-frame-pointer -Wall -Wno-strict-aliasing -ansi -std=c89 -pedantic-errors
CFLAGS = `sdl-config --cflags` -march=i686 -O6 -fomit-frame-pointer -Wall -Wno-strict-aliasing -ansi -std=c99 -pedantic-errors
#-g -ggdb -pg
#-fomit-frame-pointer
#LDFLAGS = -pg
@ -114,7 +118,9 @@ OBJECTS += $(OBJDIR)/bitwise.o \
$(OBJDIR)/vorbisfile.o \
$(OBJDIR)/window.o
ifeq ($(OS),Windows_NT)
OBJECTS += $(OBJDIR)/icon.o
endif
all: $(NAME)
@ -163,8 +169,10 @@ $(OBJDIR)/%.o : $(SRCDIR)/tremor/%.c
$(OBJDIR)/%.o : $(SRCDIR)/../sdl/%.c $(SRCDIR)/../sdl/%.h
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
ifeq ($(OS),Windows_NT)
$(OBJDIR)/icon.o :
windres $(SRCDIR)/../sdl/icon.rc $@
endif
pack :
strip $(NAME)

View File

@ -5,7 +5,9 @@
#include "osd.h"
#ifdef LOGERROR
static FILE *error_log;
#endif
void error_init(void)
{

View File

@ -101,7 +101,7 @@ static int sdl_sound_init()
return 1;
}
static void sdl_sound_update(enabled)
static void sdl_sound_update(int enabled)
{
int size = audio_update(soundframe) * 2;
@ -873,7 +873,7 @@ int main (int argc, char **argv)
case SDL_USEREVENT:
{
char caption[100];
sprintf(caption,"Genesis Plus GX - %d fps - %s)", event.user.code, (rominfo.international[0] != 0x20) ? rominfo.international : rominfo.domestic);
sprintf(caption,"Genesis Plus GX - %d fps - %s", event.user.code, (rominfo.international[0] != 0x20) ? rominfo.international : rominfo.domestic);
SDL_WM_SetCaption(caption, NULL);
break;
}