mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-02-05 22:38:29 +01:00
Merge pull request #110 from Clownacy/SDL-fixes
Fixes for the SDL build
This commit is contained in:
commit
3332611572
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,3 +3,6 @@ psp2/*.elf
|
|||||||
psp2/*.velf
|
psp2/*.velf
|
||||||
psp2/build_vita/*
|
psp2/build_vita/*
|
||||||
psp2/*.a
|
psp2/*.a
|
||||||
|
sdl/gen_sdl
|
||||||
|
sdl/build_sdl
|
||||||
|
|
||||||
|
10
sdl/Makefile
10
sdl/Makefile
@ -19,10 +19,14 @@
|
|||||||
# -D16BPP_RENDERING - configure for 16-bit pixels (RGB565)
|
# -D16BPP_RENDERING - configure for 16-bit pixels (RGB565)
|
||||||
# -D32BPP_RENDERING - configure for 32-bit pixels (RGB888)
|
# -D32BPP_RENDERING - configure for 32-bit pixels (RGB888)
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
NAME = gen_sdl.exe
|
NAME = gen_sdl.exe
|
||||||
|
else
|
||||||
|
NAME = gen_sdl
|
||||||
|
endif
|
||||||
|
|
||||||
CC = gcc
|
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
|
#-g -ggdb -pg
|
||||||
#-fomit-frame-pointer
|
#-fomit-frame-pointer
|
||||||
#LDFLAGS = -pg
|
#LDFLAGS = -pg
|
||||||
@ -114,7 +118,9 @@ OBJECTS += $(OBJDIR)/bitwise.o \
|
|||||||
$(OBJDIR)/vorbisfile.o \
|
$(OBJDIR)/vorbisfile.o \
|
||||||
$(OBJDIR)/window.o
|
$(OBJDIR)/window.o
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
OBJECTS += $(OBJDIR)/icon.o
|
OBJECTS += $(OBJDIR)/icon.o
|
||||||
|
endif
|
||||||
|
|
||||||
all: $(NAME)
|
all: $(NAME)
|
||||||
|
|
||||||
@ -163,8 +169,10 @@ $(OBJDIR)/%.o : $(SRCDIR)/tremor/%.c
|
|||||||
$(OBJDIR)/%.o : $(SRCDIR)/../sdl/%.c $(SRCDIR)/../sdl/%.h
|
$(OBJDIR)/%.o : $(SRCDIR)/../sdl/%.c $(SRCDIR)/../sdl/%.h
|
||||||
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) $< -o $@
|
||||||
|
|
||||||
|
ifeq ($(OS),Windows_NT)
|
||||||
$(OBJDIR)/icon.o :
|
$(OBJDIR)/icon.o :
|
||||||
windres $(SRCDIR)/../sdl/icon.rc $@
|
windres $(SRCDIR)/../sdl/icon.rc $@
|
||||||
|
endif
|
||||||
|
|
||||||
pack :
|
pack :
|
||||||
strip $(NAME)
|
strip $(NAME)
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
|
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
|
|
||||||
|
#ifdef LOGERROR
|
||||||
static FILE *error_log;
|
static FILE *error_log;
|
||||||
|
#endif
|
||||||
|
|
||||||
void error_init(void)
|
void error_init(void)
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ static int sdl_sound_init()
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sdl_sound_update(enabled)
|
static void sdl_sound_update(int enabled)
|
||||||
{
|
{
|
||||||
int size = audio_update(soundframe) * 2;
|
int size = audio_update(soundframe) * 2;
|
||||||
|
|
||||||
@ -873,7 +873,7 @@ int main (int argc, char **argv)
|
|||||||
case SDL_USEREVENT:
|
case SDL_USEREVENT:
|
||||||
{
|
{
|
||||||
char caption[100];
|
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);
|
SDL_WM_SetCaption(caption, NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user