diff options
author | Takamichi Horikawa <takamichiho@gmail.com> | 2017-12-27 09:42:44 +0900 |
---|---|---|
committer | Takamichi Horikawa <takamichiho@gmail.com> | 2017-12-27 09:42:44 +0900 |
commit | 6775ab6c61b65e44d05eca4ffae488d9147ee31f (patch) | |
tree | cf7733196eeed3c66692b683cbbfedd86ba442ab | |
parent | 89dea5438266ef3389e5e86310d778c64bb6b59c (diff) | |
parent | 00f1d8d6cacf48139b976f3a25c040d51e1abe74 (diff) |
merge sdl fix
-rw-r--r-- | common/fmplayer_file_win.c | 2 | ||||
-rw-r--r-- | sdl/main.c | 5 | ||||
-rw-r--r-- | sdl/unix/Makefile | 5 | ||||
-rw-r--r-- | sdl/win/Makefile | 11 |
4 files changed, 16 insertions, 7 deletions
diff --git a/common/fmplayer_file_win.c b/common/fmplayer_file_win.c index 71fb263..1d3c3c9 100644 --- a/common/fmplayer_file_win.c +++ b/common/fmplayer_file_win.c @@ -126,7 +126,7 @@ char *fmplayer_path_filename_sjis(const void *pathptr) { u16_path = u8tou16(path); #endif if (!u16_path) goto err; - PathStripPath(u16_path); + PathStripPathW(u16_path); int bufsize = WideCharToMultiByte(932, 0, u16_path, -1, 0, 0, 0, 0); if (bufsize <= 0) goto err; filename_sjis = malloc(bufsize); @@ -164,6 +164,11 @@ int main(int argc, char **argv) { SDL_Quit(); return 1; } + if (!fmdsp_pacc_init(g.fp, pc, &pacc)) { + SDL_Log("Cannot initialize fmdsp\n"); + SDL_Quit(); + return 1; + } fmdsp_pacc_set(g.fp, &g.work, &g.opna, &g.fftin); fmplayer_font_rom_load(&g.font16); fmdsp_pacc_set_font16(g.fp, &g.font16); diff --git a/sdl/unix/Makefile b/sdl/unix/Makefile index f7f7599..601dd41 100644 --- a/sdl/unix/Makefile +++ b/sdl/unix/Makefile @@ -16,8 +16,9 @@ OBJS+=fft.o TARGET:=fmplayersdl CFLAGS:=-Wall -Wextra -O2 -g -#CFLAGS+=-DPACC_GL_3 -CFLAGS+=-DPACC_GL_ES +CFLAGS+=-DLIBOPNA_ENABLE_LEVELDATA +CFLAGS+=-DPACC_GL_3 +#CFLAGS+=-DPACC_GL_ES #CFLAGS+=-DPACC_GL_ES -DPACC_GL_3 CFLAGS+=-I.. -I../.. CFLAGS+=$(shell $(SDLCONFIG) --cflags) diff --git a/sdl/win/Makefile b/sdl/win/Makefile index 0f63d19..74ddf0e 100644 --- a/sdl/win/Makefile +++ b/sdl/win/Makefile @@ -5,18 +5,21 @@ vpath %.c ../../libopna vpath %.c ../../common vpath %.c ../../fmdriver vpath %.c ../../fft -SDLCONFIG:=i686-w64-mingw32-sdl2-config -CC:=i686-w64-mingw32-gcc +#ARCH=x86_64 +ARCH=i686 +SDLCONFIG:=$(ARCH)-w64-mingw32-sdl2-config +CC:=$(ARCH)-w64-mingw32-gcc OBJS:=main.o OBJS+=pacc-gl.o -OBJS+=fmdsp-pacc.o font_fmdsp_small.o fmdsp_platform_win.o +OBJS+=fmdsp-pacc.o font_fmdsp_small.o fmdsp_platform_win.o font_rom.o OBJS+=opna.o opnafm.o opnassg.o opnadrum.o opnaadpcm.o opnatimer.o opnassg-sinc-c.o opnassg-sinc-sse2.o OBJS+=fmdriver_pmd.o fmdriver_fmp.o ppz8.o fmdriver_common.o -OBJS+=fmplayer_file.o fmplayer_work_opna.o fmplayer_file_win.o fmplayer_drumrom_win.o +OBJS+=fmplayer_file.o fmplayer_work_opna.o fmplayer_file_win.o fmplayer_drumrom_win.o fmplayer_fontrom_win.o winfont.o OBJS+=fft.o TARGET:=fmplayersdl.exe CFLAGS:=-Wall -Wextra -O2 +CFLAGS+=-DLIBOPNA_ENABLE_LEVELDATA CFLAGS+=-DFMPLAYER_FILE_WIN_UTF8 CFLAGS+=-DPACC_GL_3 #CFLAGS+=-DPACC_GL_ES |