Adding --show_profiler to show profiler by default, changing hotkey to F3.
This commit is contained in:
parent
8ce6765233
commit
ea4ec28acc
|
@ -80,6 +80,10 @@ bool EmulatorWindow::Initialize() {
|
||||||
CpuTimeScalarSetDouble();
|
CpuTimeScalarSetDouble();
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case 0x72: { // F3
|
||||||
|
Profiler::ToggleDisplay();
|
||||||
|
} break;
|
||||||
|
|
||||||
case 0x73: { // VK_F4
|
case 0x73: { // VK_F4
|
||||||
GpuTraceFrame();
|
GpuTraceFrame();
|
||||||
} break;
|
} break;
|
||||||
|
@ -135,7 +139,7 @@ bool EmulatorWindow::Initialize() {
|
||||||
cpu_menu->AddChild(MenuItem::Create(MenuItem::Type::kSeparator));
|
cpu_menu->AddChild(MenuItem::Create(MenuItem::Type::kSeparator));
|
||||||
{
|
{
|
||||||
cpu_menu->AddChild(MenuItem::Create(MenuItem::Type::kString,
|
cpu_menu->AddChild(MenuItem::Create(MenuItem::Type::kString,
|
||||||
L"Toggle Profiler &Display", L"Tab",
|
L"Toggle Profiler &Display", L"F3",
|
||||||
[]() { Profiler::ToggleDisplay(); }));
|
[]() { Profiler::ToggleDisplay(); }));
|
||||||
cpu_menu->AddChild(MenuItem::Create(MenuItem::Type::kString,
|
cpu_menu->AddChild(MenuItem::Create(MenuItem::Type::kString,
|
||||||
L"&Pause/Resume Profiler", L"`",
|
L"&Pause/Resume Profiler", L"`",
|
||||||
|
|
|
@ -619,8 +619,8 @@ dword_result_t NtQueryDirectoryFile(
|
||||||
file_name ? file_name->to_string(kernel_memory()->virtual_membase()) : "";
|
file_name ? file_name->to_string(kernel_memory()->virtual_membase()) : "";
|
||||||
if (file) {
|
if (file) {
|
||||||
X_FILE_DIRECTORY_INFORMATION dir_info = {0};
|
X_FILE_DIRECTORY_INFORMATION dir_info = {0};
|
||||||
result = file->QueryDirectory(
|
result = file->QueryDirectory(file_info_ptr, length,
|
||||||
file_info_ptr, length, !name.empty() ? name.c_str() : nullptr,
|
!name.empty() ? name.c_str() : nullptr,
|
||||||
restart_scan != 0);
|
restart_scan != 0);
|
||||||
if (XSUCCEEDED(result)) {
|
if (XSUCCEEDED(result)) {
|
||||||
info = length;
|
info = length;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#include "xenia/base/logging.h"
|
#include "xenia/base/logging.h"
|
||||||
|
|
||||||
|
#include <gflags/gflags.h>
|
||||||
|
|
||||||
#define MICROPROFILE_ENABLED 1
|
#define MICROPROFILE_ENABLED 1
|
||||||
#define MICROPROFILEUI_ENABLED 1
|
#define MICROPROFILEUI_ENABLED 1
|
||||||
#define MICROPROFILE_IMPL 1
|
#define MICROPROFILE_IMPL 1
|
||||||
|
@ -27,6 +29,8 @@
|
||||||
|
|
||||||
#include "xenia/profiling.h"
|
#include "xenia/profiling.h"
|
||||||
|
|
||||||
|
DEFINE_bool(show_profiler, false, "Show profiling UI by default.");
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
|
|
||||||
std::unique_ptr<ProfilerDisplay> Profiler::display_ = nullptr;
|
std::unique_ptr<ProfilerDisplay> Profiler::display_ = nullptr;
|
||||||
|
@ -57,7 +61,9 @@ void Profiler::Initialize() {
|
||||||
g_MicroProfileUI.bShowSpikes = true;
|
g_MicroProfileUI.bShowSpikes = true;
|
||||||
g_MicroProfileUI.nOpacityBackground = 0x40u << 24;
|
g_MicroProfileUI.nOpacityBackground = 0x40u << 24;
|
||||||
g_MicroProfileUI.nOpacityForeground = 0xc0u << 24;
|
g_MicroProfileUI.nOpacityForeground = 0xc0u << 24;
|
||||||
|
if (FLAGS_show_profiler) {
|
||||||
MicroProfileSetDisplayMode(1);
|
MicroProfileSetDisplayMode(1);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
MicroProfileSetForceEnable(true);
|
MicroProfileSetForceEnable(true);
|
||||||
MicroProfileSetEnableAllGroups(true);
|
MicroProfileSetEnableAllGroups(true);
|
||||||
|
|
Loading…
Reference in New Issue