From: notaz Date: Tue, 7 Dec 2010 10:45:07 +0000 (+0200) Subject: make PCNT stuff optional X-Git-Tag: r1~51 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa9cfe0a7ff390f15bfdc6add7e57841173d1954;p=pcsx_rearmed.git make PCNT stuff optional --- diff --git a/Makefile b/Makefile index 2716f8d9..bf3eee26 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ ifndef DEBUG CFLAGS += -O2 endif #DRC_DBG = 1 +#PCNT = 1 TARGET = pcsx all: $(TARGET) diff --git a/frontend/main.c b/frontend/main.c index fd1c1198..86aff348 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -73,6 +73,8 @@ int main(int argc, char *argv[]) int i; tmp = dlopen("/lib/libdl.so.2", RTLD_LAZY); + if (tmp == NULL) + tmp = dlopen("/lib32/libdl.so.2", RTLD_LAZY); if (tmp != NULL) real_getenv = dlsym(tmp, "getenv"); if (real_getenv == NULL) { @@ -217,7 +219,8 @@ int main(int argc, char *argv[]) if (loadst) { StatesC = loadst - 1; char *state_filename = get_state_filename(StatesC); - LoadState(state_filename); + int ret = LoadState(state_filename); + printf("%s state %s\n", ret ? "failed to load" : "loaded", state_filename); free(state_filename); } diff --git a/frontend/pcnt.h b/frontend/pcnt.h index 57bc88ad..d3eedfa5 100644 --- a/frontend/pcnt.h +++ b/frontend/pcnt.h @@ -6,6 +6,8 @@ enum pcounters { PCNT_CNT }; +#ifdef PCNT + extern unsigned int pcounters[PCNT_CNT]; extern unsigned int pcounter_starts[PCNT_CNT]; @@ -50,3 +52,15 @@ static inline unsigned int pcnt_get(void) return val; } +#else + +#define pcnt_start(id) +#define pcnt_end(id) +#define pcnt_hook_plugins() + +static inline void pcnt_print(float fps) +{ + printf("%2.1f\n", fps); +} + +#endif diff --git a/frontend/plugin.c b/frontend/plugin.c index 6cde989c..bcf3885a 100644 --- a/frontend/plugin.c +++ b/frontend/plugin.c @@ -199,6 +199,8 @@ void *plugin_link(enum builtint_plugins_e id, const char *sym) return NULL; } +#ifdef PCNT + /* basic profile stuff */ #include "pcnt.h" @@ -275,3 +277,4 @@ void pcnt_hook_plugins(void) hook_it(SPU_playCDDAchannel); } +#endif