From 3f5eae3db5d8f1deaa76b282c4f40e80f93649eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 26 Dec 2012 21:08:41 +0100 Subject: [PATCH] Add some options to ingame menu. Minor fixes. --- Core/HLE/sceDisplay.cpp | 2 +- Core/HLE/scePower.cpp | 15 +++++++++++++-- android/jni/MenuScreens.cpp | 5 +++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index d8d323cc58..ac780633a2 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -171,7 +171,7 @@ void hleEnterVblank(u64 userdata, int cyclesLate) { // Now we can subvert the Ge engine in order to draw custom overlays like stat counters etc. // Here we will be drawing to the non buffered front surface. - if (g_Config.bShowDebugStats) { + if (g_Config.bShowDebugStats && gpuStats.numDrawCalls) { gpu->UpdateStats(); char stats[512]; sprintf(stats, diff --git a/Core/HLE/scePower.cpp b/Core/HLE/scePower.cpp index c6b0fecb7d..68fd2215d7 100644 --- a/Core/HLE/scePower.cpp +++ b/Core/HLE/scePower.cpp @@ -162,6 +162,17 @@ void scePowerSetClockFrequency(u32 cpufreq, u32 busfreq, u32 gpufreq) { INFO_LOG(HLE,"scePowerSetClockFrequency(%i,%i,%i)", cpufreq, busfreq, gpufreq); } +u32 scePowerSetCpuClockFrequency(u32 cpufreq) { + CoreTiming::SetClockFrequencyMHz(cpufreq); + DEBUG_LOG(HLE,"scePowerSetCpuClockFrequency(%i)", cpufreq); + return 0; +} + +u32 scePowerSetBusClockFrequency(u32 busfreq) { + DEBUG_LOG(HLE,"scePowerSetBusClockFrequency(%i)", busfreq); + return 0; +} + u32 scePowerGetCpuClockFrequencyInt() { int freq = CoreTiming::GetClockFrequencyMHz(); INFO_LOG(HLE,"%i=scePowerGetCpuClockFrequencyInt()", freq); @@ -217,8 +228,8 @@ static const HLEFunction scePower[] = { {0x0074EF9B,0,"scePowerGetResumeCount"}, {0xDFA8BAF8,WrapI_I,"scePowerUnregisterCallback"}, {0xDB9D28DD,WrapI_I,"scePowerUnregitserCallback"}, //haha - {0x843FBF43,0,"scePowerSetCpuClockFrequency"}, - {0xB8D7B3FB,0,"scePowerSetBusClockFrequency"}, + {0x843FBF43,WrapU_U,"scePowerSetCpuClockFrequency"}, + {0xB8D7B3FB,WrapU_U,"scePowerSetBusClockFrequency"}, {0xFEE03A2F,0,"scePowerGetCpuClockFrequency"}, {0x478FE6F5,0,"scePowerGetBusClockFrequency"}, {0xFDB5BFE9,WrapU_V,"scePowerGetCpuClockFrequencyInt"}, diff --git a/android/jni/MenuScreens.cpp b/android/jni/MenuScreens.cpp index 7fe29c5d9d..f557e43584 100644 --- a/android/jni/MenuScreens.cpp +++ b/android/jni/MenuScreens.cpp @@ -207,6 +207,11 @@ void InGameMenuScreen::render() { ui_draw2d.DrawText(UBUNTU48, "Emulation Paused", dp_xres / 2, 30, 0xFFFFFFFF, ALIGN_HCENTER); + int x = 30; + int y = 50; + UICheckBox(GEN_ID, x, y += 50, "Show Debug Statistics (experimental)", ALIGN_TOPLEFT, &g_Config.bShowDebugStats); + UICheckBox(GEN_ID, x, y += 50, "Hardware Transform (experimental)", ALIGN_TOPLEFT, &g_Config.bHardwareTransform); + VLinear vlinear(dp_xres - 10, 160, 20); if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH, "Continue", ALIGN_RIGHT)) { screenManager()->finishDialog(this, DR_CANCEL);