X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Flightrec%2Fplugin.c;h=7f500fd275f8497f83b488c5ffc7e35bb405212b;hb=3e80e5c25edcf850f603cf0948e1cc16dc38e98d;hp=200ce81616f1e6a0ea507ae2a07b14857fd71626;hpb=8ba7993c5794b70c48c6ab749f91a3d12b54bc1c;p=pcsx_rearmed.git diff --git a/libpcsxcore/lightrec/plugin.c b/libpcsxcore/lightrec/plugin.c index 200ce816..7f500fd2 100644 --- a/libpcsxcore/lightrec/plugin.c +++ b/libpcsxcore/lightrec/plugin.c @@ -53,6 +53,14 @@ # define unlikely(x) (x) #endif +#ifndef LIGHTREC_PROG_NAME +# ifdef __linux__ +# define LIGHTREC_PROG_NAME "/proc/self/exe" +# else +# define LIGHTREC_PROG_NAME "retroarch.exe" +# endif +#endif + psxRegisters psxRegs; Rcnt rcnts[4]; @@ -60,8 +68,6 @@ void* code_buffer; static struct lightrec_state *lightrec_state; -static char *name = "retroarch.exe"; - static bool use_lightrec_interpreter; static bool use_pcsx_interpreter; static bool block_stepping; @@ -458,7 +464,7 @@ static int lightrec_plugin_init(void) use_lightrec_interpreter = !!getenv("LIGHTREC_INTERPRETER"); - lightrec_state = lightrec_init(name, + lightrec_state = lightrec_init(LIGHTREC_PROG_NAME, lightrec_map, ARRAY_SIZE(lightrec_map), &lightrec_ops);