thanks michaelsoft!

This commit is contained in:
Alug committed 2025-06-07 10:21:25 +01:00
1 parent 5eb4ed8391
commit be528adea5
3 files changed
+19 -13

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@
#include <string>
#include <system_error>
#include <fmt/format.h>
//#include <fmt/format.h>
//#include <tracy/tracy/Tracy.hpp>
#include "../cxxutil.hpp"
+14 -8
View File
@@ -15,7 +15,13 @@
// SPANS
// ==========================================================================
#ifdef _WIN32
#include <windows.h>
#define local_for_thread static __thread
#else
#include <threads.h>
#define local_for_thread thread_local static
#endif
#define SPANSIZE 16
#define INVSPAN 0.0625f
@@ -596,8 +602,8 @@ void R_DrawSpan_Tilted(drawspandata_t* ds)
float endz, endu, endv;
UINT32 stepu, stepv;
register UINT32 bit;
thread_local static INT32 *tiltlighting = NULL;
thread_local static INT32 oldviewwidth = 0;
local_for_thread INT32 *tiltlighting = NULL;
local_for_thread INT32 oldviewwidth = 0;
// dont realloc every frame pls thx
if (tiltlighting == NULL || oldviewwidth != viewwidth)
@@ -743,8 +749,8 @@ void R_DrawTranslucentSpan_Tilted(drawspandata_t* ds)
float endz, endu, endv;
UINT32 stepu, stepv;
register UINT32 bit;
thread_local static INT32 *tiltlighting = NULL;
thread_local static INT32 oldviewwidth = 0;
local_for_thread INT32 *tiltlighting = NULL;
local_for_thread INT32 oldviewwidth = 0;
// dont realloc every frame pls thx
if (tiltlighting == NULL || oldviewwidth != viewwidth)
@@ -891,8 +897,8 @@ void R_DrawTranslucentWaterSpan_Tilted(drawspandata_t* ds)
float endz, endu, endv;
UINT32 stepu, stepv;
register UINT32 bit;
thread_local static INT32 *tiltlighting = NULL;
thread_local static INT32 oldviewwidth = 0;
local_for_thread INT32 *tiltlighting = NULL;
local_for_thread INT32 oldviewwidth = 0;
// dont realloc every frame pls thx
if (tiltlighting == NULL || oldviewwidth != viewwidth)
@@ -1039,8 +1045,8 @@ void R_DrawSplat_Tilted(drawspandata_t* ds)
float endz, endu, endv;
UINT32 stepu, stepv;
register UINT32 bit;
thread_local static INT32 *tiltlighting = NULL;
thread_local static INT32 oldviewwidth = 0;
local_for_thread INT32 *tiltlighting = NULL;
local_for_thread INT32 oldviewwidth = 0;
// dont realloc every frame pls thx
if (tiltlighting == NULL || oldviewwidth != viewwidth)
+4 -4
View File
@@ -496,14 +496,13 @@ static void I_ReportSignal(int num, int coredumped)
#ifndef NEWSIGNALHANDLER
FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
{
if (g_main_thread_id != std::this_thread::get_id())
/*if (g_main_thread_id != std::this_thread::get_id())
{
// Do not attempt any sort of recovery if this signal triggers off the main thread
signal(num, SIG_DFL);
raise(num);
exit(-2);
}
}*/
g_in_exiting_signal_handler = true;
@@ -1569,7 +1568,8 @@ static void I_SetupMumble(void)
if (!hMap)
return;
mumble = static_cast<mumble_s*>(MapViewOfFile(hMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(*mumble)));
//mumble = static_cast<mumble_s*>(MapViewOfFile(hMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(*mumble)));
mumble = MapViewOfFile(hMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(*mumble));
if (!mumble)
CloseHandle(hMap);
#elif defined (HAVE_SHM)