diff --git a/library/Console-sdl-impl.cpp b/library/Console-sdl-impl.cpp index 7bbfa3b70c..800a59ca31 100644 --- a/library/Console-sdl-impl.cpp +++ b/library/Console-sdl-impl.cpp @@ -22,6 +22,7 @@ #include #include #include +#include //#include #include "modules/DFSDL.h" @@ -1220,7 +1221,7 @@ struct BMPFontLoader : public FontLoader { } }; -struct MainWindow; +class MainWindow; /* * Shared context object for a window and its children, includes @@ -2710,11 +2711,11 @@ class ExternalEventQueue { ExternalEventQueue(const ExternalEventQueue&) = delete; ExternalEventQueue& operator=(const ExternalEventQueue&) = delete; - using ApiTask = std::function; - Queue api_task; - private: std::mutex mutex; +public: + using ApiTask = std::function; + Queue api_task; }; void render_texture( @@ -2733,11 +2734,12 @@ int set_draw_color(SDL_Renderer* renderer, const SDL_Color& color) struct SDLConsole_pshare { Property props; std::weak_ptr impl_weak; - std::thread::id render_thread_id{0}; + //std::thread::id render_thread_id{0}; }; //static Uint32 render_frame_event_id{(Uint32)-1)}; -struct SDLConsole_impl : public std::enable_shared_from_this { +class SDLConsole_impl : public std::enable_shared_from_this { +public: Property& props; SDLConsole::State& state; SDLConsole_pshare& pshare; @@ -2855,7 +2857,7 @@ bool SDLConsole::init() if (!state.is_inactive()) return true; bool success = true; std::cerr << "SDLConsole: init() from thread: " << std::this_thread::get_id() << std::endl; - pshare->render_thread_id = std::this_thread::get_id(); + //pshare->render_thread_id = std::this_thread::get_id(); try { impl = std::make_shared(this); pshare->impl_weak = impl; diff --git a/library/Console-sdl.cpp b/library/Console-sdl.cpp index c6e713de29..9a74d5bd02 100644 --- a/library/Console-sdl.cpp +++ b/library/Console-sdl.cpp @@ -395,8 +395,9 @@ int Console::lineedit(const std::string & prompt, std::string & output, CommandH void Console::msleep (unsigned int msec) { - if (msec > 1000) sleep(msec/1000000); - usleep((msec % 1000000) * 1000); + // FIXME: temporarily removed + //if (msec > 1000) sleep(msec/1000000); + //usleep((msec % 1000000) * 1000); } bool Console::hide()