mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 09:26:25 +00:00
Renamed atomic functions to match SDL 3.0 naming convention
This will also allow us to cleanly add atomic operations for other types in the future.
This commit is contained in:
@@ -343,13 +343,13 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_QueryInter
|
||||
static ULONG STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_AddRef(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController *This)
|
||||
{
|
||||
RawGameControllerDelegate *self = (RawGameControllerDelegate *)This;
|
||||
return SDL_AtomicAdd(&self->refcount, 1) + 1UL;
|
||||
return SDL_AddAtomicInt(&self->refcount, 1) + 1UL;
|
||||
}
|
||||
|
||||
static ULONG STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_Release(__FIEventHandler_1_Windows__CGaming__CInput__CRawGameController *This)
|
||||
{
|
||||
RawGameControllerDelegate *self = (RawGameControllerDelegate *)This;
|
||||
int rc = SDL_AtomicAdd(&self->refcount, -1) - 1;
|
||||
int rc = SDL_AddAtomicInt(&self->refcount, -1) - 1;
|
||||
// Should never free the static delegate objects
|
||||
SDL_assert(rc > 0);
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user