Skip to content

Commit

Permalink
feat: TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
qudix committed Oct 19, 2024
1 parent 4642125 commit 5732962
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions CommonLibF4/include/RE/Bethesda/TLS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once

#include "REX/W32/NT.h"

namespace RE
{
struct TLS
{
[[nodiscard]] static TLS* GetSingleton()
{
return *static_cast<TLS**>(REX::W32::NtCurrentTeb()->threadLocalStoragePointer);
}

// members
std::byte pad000[0x830]; // 000
bool consoleMode; // 830
};
}
3 changes: 2 additions & 1 deletion CommonLibF4/include/RE/Fallout.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
#include "RE/Bethesda/Settings.h"
#include "RE/Bethesda/Sky.h"
#include "RE/Bethesda/SplineUtils.h"
#include "RE/Bethesda/TaskQueueInterface.h"
#include "RE/Bethesda/TESBoundAnimObjects.h"
#include "RE/Bethesda/TESBoundObjects.h"
#include "RE/Bethesda/TESCamera.h"
Expand All @@ -225,7 +226,7 @@
#include "RE/Bethesda/TESRace.h"
#include "RE/Bethesda/TESWaterForm.h"
#include "RE/Bethesda/TESWorldSpace.h"
#include "RE/Bethesda/TaskQueueInterface.h"
#include "RE/Bethesda/TLS.h"
#include "RE/Bethesda/UI.h"
#include "RE/Bethesda/UIMessage.h"
#include "RE/Bethesda/UIMessageQueue.h"
Expand Down

0 comments on commit 5732962

Please sign in to comment.