Fix unattended dumping
This commit is contained in:
parent
133957eeb8
commit
2cfa118f96
4 changed files with 8 additions and 2 deletions
|
@ -532,6 +532,8 @@ struct platform
|
||||||
* Run all queues.
|
* Run all queues.
|
||||||
*/
|
*/
|
||||||
static void run_queues() throw();
|
static void run_queues() throw();
|
||||||
|
|
||||||
|
static bool pausing_allowed;
|
||||||
};
|
};
|
||||||
|
|
||||||
class modal_pause_holder
|
class modal_pause_holder
|
||||||
|
|
|
@ -420,6 +420,8 @@ void platform::flush_command_queue() throw()
|
||||||
while(true) {
|
while(true) {
|
||||||
mutex::holder h(*queue_lock);
|
mutex::holder h(*queue_lock);
|
||||||
internal_run_queues(true);
|
internal_run_queues(true);
|
||||||
|
if(!pausing_allowed)
|
||||||
|
return;
|
||||||
uint64_t now = get_utime();
|
uint64_t now = get_utime();
|
||||||
uint64_t waitleft = 0;
|
uint64_t waitleft = 0;
|
||||||
waitleft = (now < continue_time) ? (continue_time - now) : 0;
|
waitleft = (now < continue_time) ? (continue_time - now) : 0;
|
||||||
|
@ -573,5 +575,5 @@ modal_pause_holder::~modal_pause_holder()
|
||||||
platform::set_modal_pause(false);
|
platform::set_modal_pause(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool platform::pausing_allowed = true;
|
||||||
volatile bool queue_synchronous_fn_warning;
|
volatile bool queue_synchronous_fn_warning;
|
||||||
|
|
|
@ -10,6 +10,7 @@ namespace
|
||||||
|
|
||||||
void graphics_plugin::init() throw()
|
void graphics_plugin::init() throw()
|
||||||
{
|
{
|
||||||
|
platform::pausing_allowed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void graphics_plugin::quit() throw()
|
void graphics_plugin::quit() throw()
|
||||||
|
@ -29,7 +30,6 @@ void graphics_plugin::notify_message() throw()
|
||||||
|
|
||||||
void graphics_plugin::notify_status() throw()
|
void graphics_plugin::notify_status() throw()
|
||||||
{
|
{
|
||||||
std::cerr << "Exiting on fatal error." << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void graphics_plugin::notify_screen() throw()
|
void graphics_plugin::notify_screen() throw()
|
||||||
|
@ -44,6 +44,7 @@ bool graphics_plugin::modal_message(const std::string& text, bool confirm) throw
|
||||||
|
|
||||||
void graphics_plugin::fatal_error() throw()
|
void graphics_plugin::fatal_error() throw()
|
||||||
{
|
{
|
||||||
|
std::cerr << "Exiting on fatal error." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* graphics_plugin::name = "Dummy graphics plugin";
|
const char* graphics_plugin::name = "Dummy graphics plugin";
|
||||||
|
|
|
@ -165,6 +165,7 @@ int main(int argc, char** argv)
|
||||||
x << snes_library_id() << " (" << SNES::Info::Profile << " core)";
|
x << snes_library_id() << " (" << SNES::Info::Profile << " core)";
|
||||||
bsnes_core_version = x.str();
|
bsnes_core_version = x.str();
|
||||||
}
|
}
|
||||||
|
platform::init();
|
||||||
init_lua();
|
init_lua();
|
||||||
|
|
||||||
messages << "BSNES version: " << bsnes_core_version << std::endl;
|
messages << "BSNES version: " << bsnes_core_version << std::endl;
|
||||||
|
|
Loading…
Add table
Reference in a new issue