Merge pull request #104851 from Ivorforce/tracy
Add `profiler` option to `SCons` builds, with support for `tracy` and `perfetto`.
This commit is contained in:
@ -30,6 +30,7 @@
|
||||
|
||||
#include "os_windows.h"
|
||||
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "main/main.h"
|
||||
|
||||
#include <clocale>
|
||||
@ -66,6 +67,8 @@ char *wc_to_utf8(const wchar_t *wc) {
|
||||
}
|
||||
|
||||
int widechar_main(int argc, wchar_t **argv) {
|
||||
godot_init_profiler();
|
||||
|
||||
OS_Windows os(nullptr);
|
||||
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
#include "core/debugger/script_debugger.h"
|
||||
#include "core/io/marshalls.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "core/version_generated.gen.h"
|
||||
#include "drivers/windows/dir_access_windows.h"
|
||||
#include "drivers/windows/file_access_windows.h"
|
||||
@ -2329,6 +2330,8 @@ void OS_Windows::run() {
|
||||
main_loop->initialize();
|
||||
|
||||
while (true) {
|
||||
GodotProfileFrameMark;
|
||||
GodotProfileZone("OS_Windows::run");
|
||||
DisplayServer::get_singleton()->process_events(); // get rid of pending events
|
||||
if (Main::iteration()) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user