mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-14 13:56:00 +00:00
Rename SDL_SetThreadPriority() to SDL_SetCurrentThreadPriority()
Fixes https://github.com/libsdl-org/SDL/issues/11055
This commit is contained in:
@@ -781,7 +781,7 @@ static void SDL_AudioFreeDeviceHandle_Default(SDL_AudioDevice *device) { /* no-o
|
||||
|
||||
static void SDL_AudioThreadInit_Default(SDL_AudioDevice *device)
|
||||
{
|
||||
SDL_SetThreadPriority(device->recording ? SDL_THREAD_PRIORITY_HIGH : SDL_THREAD_PRIORITY_TIME_CRITICAL);
|
||||
SDL_SetCurrentThreadPriority(device->recording ? SDL_THREAD_PRIORITY_HIGH : SDL_THREAD_PRIORITY_TIME_CRITICAL);
|
||||
}
|
||||
|
||||
static void SDL_AudioDetectDevices_Default(SDL_AudioDevice **default_playback, SDL_AudioDevice **default_recording)
|
||||
|
@@ -823,7 +823,7 @@ static SDL_Thread *ALSA_hotplug_thread;
|
||||
|
||||
static int SDLCALL ALSA_HotplugThread(void *arg)
|
||||
{
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_LOW);
|
||||
SDL_SetCurrentThreadPriority(SDL_THREAD_PRIORITY_LOW);
|
||||
|
||||
while (!SDL_GetAtomicInt(&ALSA_hotplug_shutdown)) {
|
||||
// Block awhile before checking again, unless we're told to stop.
|
||||
|
@@ -892,7 +892,7 @@ static int SDLCALL HotplugThread(void *data)
|
||||
{
|
||||
pa_operation *op;
|
||||
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_LOW);
|
||||
SDL_SetCurrentThreadPriority(SDL_THREAD_PRIORITY_LOW);
|
||||
PULSEAUDIO_pa_threaded_mainloop_lock(pulseaudio_threaded_mainloop);
|
||||
PULSEAUDIO_pa_context_set_subscribe_callback(pulseaudio_context, HotplugCallback, NULL);
|
||||
|
||||
|
@@ -143,7 +143,7 @@ void WASAPI_PlatformThreadInit(SDL_AudioDevice *device)
|
||||
DWORD idx = 0;
|
||||
device->hidden->task = pAvSetMmThreadCharacteristicsW(L"Pro Audio", &idx);
|
||||
} else {
|
||||
SDL_SetThreadPriority(device->recording ? SDL_THREAD_PRIORITY_HIGH : SDL_THREAD_PRIORITY_TIME_CRITICAL);
|
||||
SDL_SetCurrentThreadPriority(device->recording ? SDL_THREAD_PRIORITY_HIGH : SDL_THREAD_PRIORITY_TIME_CRITICAL);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -785,7 +785,7 @@ void SDL_CameraThreadSetup(SDL_Camera *device)
|
||||
}*/
|
||||
#else
|
||||
// The camera capture is always a high priority thread
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
SDL_SetCurrentThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -600,8 +600,8 @@ SDL3_0.0.0 {
|
||||
SDL_IsJoystickHaptic;
|
||||
SDL_IsJoystickVirtual;
|
||||
SDL_IsMouseHaptic;
|
||||
SDL_IsTablet;
|
||||
SDL_IsTV;
|
||||
SDL_IsTablet;
|
||||
SDL_JoystickConnected;
|
||||
SDL_JoystickEventsEnabled;
|
||||
SDL_KillProcess;
|
||||
@@ -796,6 +796,7 @@ SDL3_0.0.0 {
|
||||
SDL_SetBooleanProperty;
|
||||
SDL_SetClipboardData;
|
||||
SDL_SetClipboardText;
|
||||
SDL_SetCurrentThreadPriority;
|
||||
SDL_SetCursor;
|
||||
SDL_SetEnvironmentVariable;
|
||||
SDL_SetError;
|
||||
@@ -869,7 +870,6 @@ SDL3_0.0.0 {
|
||||
SDL_SetTextureColorMod;
|
||||
SDL_SetTextureColorModFloat;
|
||||
SDL_SetTextureScaleMode;
|
||||
SDL_SetThreadPriority;
|
||||
SDL_SetWindowAlwaysOnTop;
|
||||
SDL_SetWindowAspectRatio;
|
||||
SDL_SetWindowBordered;
|
||||
|
@@ -625,8 +625,8 @@
|
||||
#define SDL_IsJoystickHaptic SDL_IsJoystickHaptic_REAL
|
||||
#define SDL_IsJoystickVirtual SDL_IsJoystickVirtual_REAL
|
||||
#define SDL_IsMouseHaptic SDL_IsMouseHaptic_REAL
|
||||
#define SDL_IsTablet SDL_IsTablet_REAL
|
||||
#define SDL_IsTV SDL_IsTV_REAL
|
||||
#define SDL_IsTablet SDL_IsTablet_REAL
|
||||
#define SDL_JoystickConnected SDL_JoystickConnected_REAL
|
||||
#define SDL_JoystickEventsEnabled SDL_JoystickEventsEnabled_REAL
|
||||
#define SDL_KillProcess SDL_KillProcess_REAL
|
||||
@@ -821,6 +821,7 @@
|
||||
#define SDL_SetBooleanProperty SDL_SetBooleanProperty_REAL
|
||||
#define SDL_SetClipboardData SDL_SetClipboardData_REAL
|
||||
#define SDL_SetClipboardText SDL_SetClipboardText_REAL
|
||||
#define SDL_SetCurrentThreadPriority SDL_SetCurrentThreadPriority_REAL
|
||||
#define SDL_SetCursor SDL_SetCursor_REAL
|
||||
#define SDL_SetEnvironmentVariable SDL_SetEnvironmentVariable_REAL
|
||||
#define SDL_SetError SDL_SetError_REAL
|
||||
@@ -894,7 +895,6 @@
|
||||
#define SDL_SetTextureColorMod SDL_SetTextureColorMod_REAL
|
||||
#define SDL_SetTextureColorModFloat SDL_SetTextureColorModFloat_REAL
|
||||
#define SDL_SetTextureScaleMode SDL_SetTextureScaleMode_REAL
|
||||
#define SDL_SetThreadPriority SDL_SetThreadPriority_REAL
|
||||
#define SDL_SetWindowAlwaysOnTop SDL_SetWindowAlwaysOnTop_REAL
|
||||
#define SDL_SetWindowAspectRatio SDL_SetWindowAspectRatio_REAL
|
||||
#define SDL_SetWindowBordered SDL_SetWindowBordered_REAL
|
||||
|
@@ -645,8 +645,8 @@ SDL_DYNAPI_PROC(bool,SDL_IsGamepad,(SDL_JoystickID a),(a),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_IsJoystickHaptic,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_IsJoystickVirtual,(SDL_JoystickID a),(a),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_IsMouseHaptic,(void),(),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_IsTablet,(void),(),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_IsTV,(void),(),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_IsTablet,(void),(),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_JoystickConnected,(SDL_Joystick *a),(a),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_JoystickEventsEnabled,(void),(),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_KillProcess,(SDL_Process *a, bool b),(a,b),return)
|
||||
@@ -832,6 +832,7 @@ SDL_DYNAPI_PROC(bool,SDL_SetAudioStreamPutCallback,(SDL_AudioStream *a, SDL_Audi
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetBooleanProperty,(SDL_PropertiesID a, const char *b, bool c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetClipboardData,(SDL_ClipboardDataCallback a, SDL_ClipboardCleanupCallback b, void *c, const char **d, size_t e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetClipboardText,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetCurrentThreadPriority,(SDL_ThreadPriority a),(a),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetCursor,(SDL_Cursor *a),(a),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetEnvironmentVariable,(SDL_Environment *a, const char *b, const char *c, bool d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_SetEventEnabled,(Uint32 a, bool b),(a,b),)
|
||||
@@ -904,7 +905,6 @@ SDL_DYNAPI_PROC(bool,SDL_SetTextureBlendMode,(SDL_Texture *a, SDL_BlendMode b),(
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetTextureColorMod,(SDL_Texture *a, Uint8 b, Uint8 c, Uint8 d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetTextureColorModFloat,(SDL_Texture *a, float b, float c, float d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetTextureScaleMode,(SDL_Texture *a, SDL_ScaleMode b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetThreadPriority,(SDL_ThreadPriority a),(a),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetWindowAlwaysOnTop,(SDL_Window *a, bool b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetWindowAspectRatio,(SDL_Window *a, float b, float c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(bool,SDL_SetWindowBordered,(SDL_Window *a, bool b),(a,b),return)
|
||||
|
@@ -59,7 +59,7 @@ static int SDLCALL SDL_HIDAPI_RumbleThread(void *data)
|
||||
{
|
||||
SDL_HIDAPI_RumbleContext *ctx = (SDL_HIDAPI_RumbleContext *)data;
|
||||
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
SDL_SetCurrentThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
|
||||
while (SDL_GetAtomicInt(&ctx->running)) {
|
||||
SDL_HIDAPI_RumbleRequest *request = NULL;
|
||||
|
@@ -62,7 +62,7 @@ static int SDLCALL SDL_ANDROID_SensorThread(void *data)
|
||||
ASensorEvent event;
|
||||
struct android_poll_source *source;
|
||||
|
||||
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
SDL_SetCurrentThreadPriority(SDL_THREAD_PRIORITY_HIGH);
|
||||
|
||||
SDL_sensor_looper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS);
|
||||
SDL_SignalSemaphore(ctx->sem);
|
||||
|
@@ -439,7 +439,7 @@ const char *SDL_GetThreadName(SDL_Thread *thread)
|
||||
}
|
||||
}
|
||||
|
||||
bool SDL_SetThreadPriority(SDL_ThreadPriority priority)
|
||||
bool SDL_SetCurrentThreadPriority(SDL_ThreadPriority priority)
|
||||
{
|
||||
return SDL_SYS_SetThreadPriority(priority);
|
||||
}
|
||||
|
Reference in New Issue
Block a user