refactor: remove dead code and fix thread safety in console_helpers

This commit is contained in:
MatthewBeshay
2026-04-03 19:00:40 +11:00
parent 5bbb045e86
commit 116cf4887d
26 changed files with 93 additions and 597 deletions
@@ -84,7 +84,7 @@ void LeaderboardManager::printStats(ReadView& view) {
ReadScore score = view.m_queries[i];
app.DebugPrintf("\tname='%s'\n",
wstringtofilename(std::wstring(score.m_name)));
wstringtofilename(std::wstring(score.m_name)).c_str());
app.DebugPrintf("\trank='%i'\n", score.m_rank);
app.DebugPrintf("\tstatsData=[");
@@ -29,7 +29,6 @@
#include "XboxStubs.h"
#include "console_helpers/StringHelpers.h"
#include "platform/PlatformServices.h"
#include "console_helpers/ThreadName.h"
#include "console_helpers/compression.h"
#include "java/File.h"
#include "minecraft/client/Minecraft.h"
@@ -196,7 +195,6 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft,
new C4JThread(&CGameNetworkManager::ServerThreadProc, lpParameter,
"Server", 256 * 1024);
thread->setProcessor(CPU_CORE_SERVER);
thread->run();
app.DebugPrintf("[NET] Waiting for server ready...\n");
@@ -828,7 +826,7 @@ int CGameNetworkManager::ServerThreadProc(void* lpParameter) {
}
}
SetThreadName(-1, "Minecraft Server thread");
C4JThread::setThreadName(static_cast<std::uint32_t>(-1), "Minecraft Server thread");
Compression::UseDefaultThreadStorage();
OldChunkStorage::UseDefaultThreadStorage();
Entity::useSmallIds();
+1 -2
View File
@@ -12,8 +12,7 @@
#include "app/common/src/Network/GameNetworkManager.h"
#include "app/common/src/Network/NetworkPlayerInterface.h"
#include "console_helpers/C4JThread.h" // 4jcraft TODO
#include "console_helpers/ThreadName.h" // 4jcraft TODO
#include "console_helpers/C4JThread.h"
#include "java/InputOutputStream/InputStream.h"
#include "java/InputOutputStream/OutputStream.h"
@@ -83,8 +83,6 @@ UIScene_FullscreenProgress::UIScene_FullscreenProgress(int iPad, void* initData,
m_labelTip.setVisible(m_CompletionData->bShowTips);
thread = new C4JThread(params->func, params->lpParam, "FullscreenProgress");
thread->setProcessor(CPU_CORE_UI_SCENE); // TODO 4J Stu - Make sure this is
// a good thread/core to use
m_threadCompleted = false;
thread->run();