37 }
catch (
const std::exception &
e) {
38 PLAIN_LOG <<
"Save blocker dtor swallowing an exception: " <<
e.what();
45 (controller->*callback)();
53 return SDL_GetSemaphoreValue(
sem_) == 0;
57 SDL_WaitSemaphore(
sem_);
61 return SDL_TryWaitSemaphore(
sem_) == 0;
65 assert(SDL_GetSemaphoreValue(
sem_) == 0);
66 SDL_SignalSemaphore(
sem_);
While any instance of this class exists, attempts to save the game via any call to play_controller wi...
static bool saves_are_blocked()
static void on_unblock(play_controller *controller, void(play_controller::*callback)())
static void(play_controller::* callback_)()
static play_controller * controller_
static SDL_Semaphore * sem_
Standard logging facilities (interface).