changew fow SDW3 :3c
This commit is contained in:
parent
f01e12e703
commit
8b3272c1c0
|
|
@ -603,7 +603,7 @@ std::string Oneshot::textinput(const char* prompt, int char_limit, const char* f
|
||||||
threadData.acceptingTextInput.set();
|
threadData.acceptingTextInput.set();
|
||||||
threadData.inputTextLimit = char_limit;
|
threadData.inputTextLimit = char_limit;
|
||||||
threadData.inputText.clear();
|
threadData.inputText.clear();
|
||||||
SDL_StartTextInput();
|
SDL_StartTextInput(this->p->window);
|
||||||
|
|
||||||
// Main loop
|
// Main loop
|
||||||
while (threadData.acceptingTextInput) {
|
while (threadData.acceptingTextInput) {
|
||||||
|
|
@ -615,7 +615,7 @@ std::string Oneshot::textinput(const char* prompt, int char_limit, const char* f
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable text input
|
// Disable text input
|
||||||
SDL_StopTextInput();
|
SDL_StopTextInput(this->p->window);
|
||||||
|
|
||||||
return threadData.inputText;
|
return threadData.inputText;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,29 +27,26 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#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);
|
//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)
|
static int vfSeek(void *datasource, ogg_int64_t offset, int whence) {
|
||||||
{
|
return SDL_SeekIO(static_cast<SDL_IOStream*>(datasource), offset, (SDL_IOWhence)whence);
|
||||||
return SDL_SeekIO(static_cast<SDL_IOStream*>(ops), offset, whence);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static long vfTell(void* ops)
|
static long vfTell(void *datasource) {
|
||||||
{
|
return SDL_TellIO(static_cast<SDL_IOStream*>(datasource));
|
||||||
return SDL_TellIO(static_cast<SDL_IOStream*>(ops));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ov_callbacks OvCallbacks ={
|
static ov_callbacks OvCallbacks ={
|
||||||
vfRead,
|
vfRead,
|
||||||
vfSeek,
|
vfSeek,
|
||||||
0,
|
0,
|
||||||
vfTell
|
vfTell
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct VorbisSource : ALDataSource
|
struct VorbisSource : ALDataSource
|
||||||
{
|
{
|
||||||
SDL_IOStream &src;
|
SDL_IOStream &src;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue