changew fow SDW3 :3c

This commit is contained in:
meowtech 2026-03-30 22:12:47 +00:00
parent f01e12e703
commit 8b3272c1c0
2 changed files with 9 additions and 12 deletions

View file

@ -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;
}

View file

@ -27,19 +27,17 @@
#include <vector>
#include <algorithm>
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<SDL_IOStream*>(ops), ptr, size);
return SDL_ReadIO(static_cast<SDL_IOStream*>(datasource), ptr, size);
}
static int vfSeek(void* ops, ogg_int64_t offset, SDL_IOWhence whence)
{
return SDL_SeekIO(static_cast<SDL_IOStream*>(ops), offset, whence);
static int vfSeek(void *datasource, ogg_int64_t offset, int whence) {
return SDL_SeekIO(static_cast<SDL_IOStream*>(datasource), offset, (SDL_IOWhence)whence);
}
static long vfTell(void* ops)
{
return SDL_TellIO(static_cast<SDL_IOStream*>(ops));
static long vfTell(void *datasource) {
return SDL_TellIO(static_cast<SDL_IOStream*>(datasource));
}
static ov_callbacks OvCallbacks ={
@ -49,7 +47,6 @@ static ov_callbacks OvCallbacks ={
vfTell
};
struct VorbisSource : ALDataSource
{
SDL_IOStream &src;