aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2010-12-07 12:45:07 +0200
committernotaz2010-12-14 15:25:04 +0200
commitfa9cfe0a7ff390f15bfdc6add7e57841173d1954 (patch)
tree13308847990df618f760feaf4fd1e0783211dbe7
parentae602c19f527fbc1f44cdb744cf824d04b8eceb1 (diff)
downloadpcsx_rearmed-fa9cfe0a7ff390f15bfdc6add7e57841173d1954.tar.gz
pcsx_rearmed-fa9cfe0a7ff390f15bfdc6add7e57841173d1954.tar.bz2
pcsx_rearmed-fa9cfe0a7ff390f15bfdc6add7e57841173d1954.zip
make PCNT stuff optional
-rw-r--r--Makefile1
-rw-r--r--frontend/main.c5
-rw-r--r--frontend/pcnt.h14
-rw-r--r--frontend/plugin.c3
4 files changed, 22 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2716f8d..bf3eee2 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 fd1c119..86aff34 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 57bc88a..d3eedfa 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 6cde989..bcf3885 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