From 602efd6d6e8d14171727736c30629927e9420c07 Mon Sep 17 00:00:00 2001 From: Luke Usher Date: Thu, 22 Nov 2018 07:28:37 +0000 Subject: [PATCH] Remove upper limit on Xbox Threads: This was a left-over from original Cxbx and is unnecessary --- src/Cxbx.h | 3 -- src/CxbxKrnl/CxbxKrnl.cpp | 69 +++++++++++++-------------------------- 2 files changed, 22 insertions(+), 50 deletions(-) diff --git a/src/Cxbx.h b/src/Cxbx.h index 73154c6f7..d59f5bc1b 100644 --- a/src/Cxbx.h +++ b/src/Cxbx.h @@ -119,9 +119,6 @@ extern bool g_bIsRetail; /*! indicates ability to save on exit (needed for settings reset) */ extern bool g_SaveOnExit; -/*! maximum number of threads cxbx can handle */ -#define MAXIMUM_XBOX_THREADS 256 - /*! runtime DBG_PRINTF toggle boolean */ extern volatile bool g_bPrintfOn; diff --git a/src/CxbxKrnl/CxbxKrnl.cpp b/src/CxbxKrnl/CxbxKrnl.cpp index 8f429a5cf..3f5c0b24c 100644 --- a/src/CxbxKrnl/CxbxKrnl.cpp +++ b/src/CxbxKrnl/CxbxKrnl.cpp @@ -92,7 +92,7 @@ std::string CxbxKrnl_DebugFileName = ""; Xbe::Certificate *g_pCertificate = NULL; /*! thread handles */ -static HANDLE g_hThreads[MAXIMUM_XBOX_THREADS] = { 0 }; +static std::vector g_hThreads; char szFilePath_CxbxReloaded_Exe[MAX_PATH] = { 0 }; char szFolder_CxbxReloadedData[MAX_PATH] = { 0 }; @@ -1703,21 +1703,7 @@ void CxbxKrnlRegisterThread(HANDLE hThread) } } - int v=0; - - for(v=0;v