diff options
| author | Yang Liu <numbksco@gmail.com> | 2024-09-28 01:00:08 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-27 19:00:08 +0200 |
| commit | 42e60bc7c52d49805a74d19745574e28d76ab46f (patch) | |
| tree | 15e615e8658e13440c1b70d74cf54866b7393126 /src/wrapped/wrappedsdl2.c | |
| parent | 93dc8fce10bf7ee7da52aeead17723beea1157d7 (diff) | |
| download | box64-42e60bc7c52d49805a74d19745574e28d76ab46f.tar.gz box64-42e60bc7c52d49805a74d19745574e28d76ab46f.zip | |
[BOX32][WRAPPER] Wrapped more SDL2 functions (#1881)
Diffstat (limited to 'src/wrapped/wrappedsdl2.c')
| -rw-r--r-- | src/wrapped/wrappedsdl2.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/wrapped/wrappedsdl2.c b/src/wrapped/wrappedsdl2.c index d0a933d7..a59ec93a 100644 --- a/src/wrapped/wrappedsdl2.c +++ b/src/wrapped/wrappedsdl2.c @@ -237,19 +237,15 @@ EXPORT int64_t my2_SDL_OpenAudio(x64emu_t* emu, void* d, void* o) return ret; } -EXPORT int64_t my2_SDL_OpenAudioDevice(x64emu_t* emu, void* device, int64_t iscapture, void* d, void* o, int64_t allowed) +EXPORT uint32_t my2_SDL_OpenAudioDevice(x64emu_t* emu, void* device, int iscapture, void* d, void* o, int allowed) { - SDL2_AudioSpec *desired = (SDL2_AudioSpec*)d; + SDL2_AudioSpec* desired = (SDL2_AudioSpec*)d; // create a callback - void *fnc = (void*)desired->callback; + void* fnc = (void*)desired->callback; desired->callback = find_AudioCallback_Fct(fnc); - int ret = my->SDL_OpenAudioDevice(device, iscapture, desired, (SDL2_AudioSpec*)o, allowed); - if (ret<=0) { - // error, clean the callback... - desired->callback = fnc; - return ret; - } + uint32_t ret = my->SDL_OpenAudioDevice(device, iscapture, desired, (SDL2_AudioSpec*)o, allowed); + // put back stuff in place? desired->callback = fnc; |