File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ enum class ThreadPriority {
9696void set_native_thread_name (const std::string& name);
9797void set_native_thread_priority (ThreadPriority pri);
9898PTR (OSThread) this_thread();
99- void set_main_thread ();
99+ void set_entrypoint_thread ();
100+ bool is_entrypoint_thread ();
100101bool is_game_thread ();
101102void submit_rsp_task (RDRAM_ARG PTR (OSTask) task);
102103void send_si_message ();
Original file line number Diff line number Diff line change @@ -29,14 +29,18 @@ std::string ultramodern::threads::get_game_thread_name(const OSThread* t) {
2929
3030extern " C" void bootproc ();
3131
32- thread_local bool is_main_thread = false ;
32+ thread_local bool is_entrypoint_thread = false ;
3333// Whether this thread is part of the game (i.e. the start thread or one spawned by osCreateThread)
3434thread_local bool is_game_thread = false ;
3535thread_local PTR (OSThread) thread_self = NULLPTR;
3636
37- void ultramodern::set_main_thread () {
37+ void ultramodern::set_entrypoint_thread () {
3838 ::is_game_thread = true ;
39- is_main_thread = true ;
39+ ::is_entrypoint_thread = true ;
40+ }
41+
42+ bool ultramodern::is_entrypoint_thread () {
43+ return ::is_entrypoint_thread;
4044}
4145
4246bool ultramodern::is_game_thread () {
@@ -45,7 +49,7 @@ bool ultramodern::is_game_thread() {
4549
4650#if 0
4751int main(int argc, char** argv) {
48- ultramodern::set_main_thread ();
52+ ultramodern::set_entrypoint_thread ();
4953
5054 bootproc();
5155}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ void ultramodern::set_callbacks(
2222}
2323
2424void ultramodern::preinit (RDRAM_ARG ultramodern::renderer::WindowHandle window_handle) {
25- ultramodern::set_main_thread ();
25+ ultramodern::set_entrypoint_thread ();
2626 ultramodern::init_events (PASS_RDRAM window_handle);
2727 ultramodern::init_timers (PASS_RDRAM1);
2828 ultramodern::init_audio ();
You can’t perform that action at this time.
0 commit comments