X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fgp2x%2F940ctl.c;h=921922c90365355cb42ec3853ba9f6dbad522952;hb=d90f5bd7488f5e5f41fd091fe05c1d67eccc276d;hp=462482243c1afff84c01a5f361b8ca54f4edab1e;hpb=0d9bf4fcda2bf375a1fabd4a42e244701b8a185f;p=picodrive.git diff --git a/platform/gp2x/940ctl.c b/platform/gp2x/940ctl.c index 4624822..921922c 100644 --- a/platform/gp2x/940ctl.c +++ b/platform/gp2x/940ctl.c @@ -13,7 +13,6 @@ #include "code940/940shared.h" #include "soc_mmsp2.h" #include "soc.h" -#include "emu.h" #include "../common/mp3.h" #include "../common/arm_utils.h" #include "../common/menu.h" @@ -22,7 +21,6 @@ #include "../../pico/sound/ym2612.h" #include "../../pico/sound/mix.h" -extern int reset_timing; static unsigned char *shared_mem = 0; static _940_data_t *shared_data = 0; _940_ctl_t *shared_ctl = 0; @@ -297,15 +295,10 @@ void YM2612Init_940(int baseclock, int rate) { unsigned char ucData[1024]; int nRead, i, nLen = 0; - char binpath[1024]; + char binpath[512]; FILE *fp; - strncpy(binpath, g_argv[0], 1023); - binpath[1023] = 0; - for (i = strlen(binpath); i > 0; i--) - if (binpath[i] == '/') { binpath[i] = 0; break; } - strcat(binpath, "/" CODE940_FILE); - + emu_make_path(binpath, CODE940_FILE, sizeof(binpath)); fp = fopen(binpath, "rb"); if(!fp) {