From 8b3272c1c00d4fb6130e68f6c45fa38fb3182acd Mon Sep 17 00:00:00 2001 From: meowtech Date: Mon, 30 Mar 2026 22:12:47 +0000 Subject: [PATCH] changew fow SDW3 :3c --- src/oneshot.cpp | 4 ++-- src/vorbissource.cpp | 17 +++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/oneshot.cpp b/src/oneshot.cpp index 3eafea9..eaf4174 100644 --- a/src/oneshot.cpp +++ b/src/oneshot.cpp @@ -603,7 +603,7 @@ std::string Oneshot::textinput(const char* prompt, int char_limit, const char* f threadData.acceptingTextInput.set(); threadData.inputTextLimit = char_limit; threadData.inputText.clear(); - SDL_StartTextInput(); + SDL_StartTextInput(this->p->window); // Main loop while (threadData.acceptingTextInput) { @@ -615,7 +615,7 @@ std::string Oneshot::textinput(const char* prompt, int char_limit, const char* f } // Disable text input - SDL_StopTextInput(); + SDL_StopTextInput(this->p->window); return threadData.inputText; } diff --git a/src/vorbissource.cpp b/src/vorbissource.cpp index eae41bd..3bff7bb 100644 --- a/src/vorbissource.cpp +++ b/src/vorbissource.cpp @@ -27,29 +27,26 @@ #include #include -static size_t vfRead(void* ptr, size_t size, void* ops){ +static size_t vfRead(void *ptr, size_t size, size_t nmemb, void *datasource) { //size_t SDL_ReadIO(SDL_IOStream *context, void *ptr, size_t size); - return SDL_ReadIO(static_cast(ops), ptr, size); + return SDL_ReadIO(static_cast(datasource), ptr, size); } -static int vfSeek(void* ops, ogg_int64_t offset, SDL_IOWhence whence) -{ - return SDL_SeekIO(static_cast(ops), offset, whence); +static int vfSeek(void *datasource, ogg_int64_t offset, int whence) { + return SDL_SeekIO(static_cast(datasource), offset, (SDL_IOWhence)whence); } -static long vfTell(void* ops) -{ - return SDL_TellIO(static_cast(ops)); +static long vfTell(void *datasource) { + return SDL_TellIO(static_cast(datasource)); } static ov_callbacks OvCallbacks ={ vfRead, vfSeek, 0, - vfTell + vfTell }; - struct VorbisSource : ALDataSource { SDL_IOStream &src;