mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
changew fow SDW3 :3c
This commit is contained in:
parent
f01e12e703
commit
8b3272c1c0
2 changed files with 9 additions and 12 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,29 +27,26 @@
|
|||
#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 ={
|
||||
vfRead,
|
||||
vfSeek,
|
||||
0,
|
||||
vfTell
|
||||
vfTell
|
||||
};
|
||||
|
||||
|
||||
struct VorbisSource : ALDataSource
|
||||
{
|
||||
SDL_IOStream &src;
|
||||
|
|
|
|||
Loading…
Reference in a new issue