X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fgp2x%2F940ctl.c;h=38a9f9dd321c0f6c89bf597937f54ca40da50864;hb=3328d53bb7d323f9009181e9308fad37a5b5d427;hp=11890bd528ce85290692d533c77a13204e198ba0;hpb=bcd94522e8afb8d4b266f241adfd2e9aea111904;p=picodrive.git diff --git a/platform/gp2x/940ctl.c b/platform/gp2x/940ctl.c index 11890bd..38a9f9d 100644 --- a/platform/gp2x/940ctl.c +++ b/platform/gp2x/940ctl.c @@ -17,11 +17,11 @@ #include "../common/arm_utils.h" #include "../common/menu.h" #include "../common/emu.h" +#include "../common/input.h" #include "../../pico/pico_int.h" #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; @@ -295,16 +295,11 @@ void YM2612Init_940(int baseclock, int rate) if (crashed_940) { unsigned char ucData[1024]; - int nRead, i, nLen = 0; - char binpath[1024]; + int nRead, nLen = 0; + 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) { @@ -312,6 +307,7 @@ void YM2612Init_940(int baseclock, int rate) text_out16(10, 100, "failed to open required file:"); text_out16(10, 110, CODE940_FILE); gp2x_video_flip2(); + in_menu_wait(PBTN_MOK|PBTN_MBACK, 100); printf("failed to open %s\n", binpath); exit(1); }