Merge pull request #4719 from Sonicadvance1/runtime_mode_switch_take2

Runtime mode switch take 2
This commit is contained in:
Ryan Houdek authored and GitHub committed 2025-07-30 11:47:54 -07:00
commit 369ca5cb72
62 files changed
+18020 -17889

No files matched your search

+2 -1
View File
@@ -379,7 +379,8 @@ static void LoadStateFromECContext(FEXCore::Core::InternalThreadState* Thread, C
// The TEB is the only populated GDT entry by default
const auto TEB = reinterpret_cast<uint64_t>(NtCurrentTeb());
State.gdt[(Context.SegGs & 0xffff) >> 3].base = TEB;
State.SetGDTBase(&State.gdt[(Context.SegGs & 0xffff) >> 3], TEB);
State.SetGDTLimit(&State.gdt[(Context.SegGs & 0xffff) >> 3], 0xF'FFFFU);
State.gs_cached = TEB;
State.fs_cached = 0;
State.es_cached = 0;