Merge branch 'master' into jgrpp

This commit is contained in:
Jonathan G Rennison
2021-04-05 17:50:39 +01:00
164 changed files with 3493 additions and 2443 deletions

View File

@@ -236,6 +236,16 @@ bool VideoDriver_Allegro::ClaimMousePointer()
return true;
}
std::vector<int> VideoDriver_Allegro::GetListOfMonitorRefreshRates()
{
std::vector<int> rates = {};
int refresh_rate = get_refresh_rate();
if (refresh_rate != 0) rates.push_back(refresh_rate);
return rates;
}
struct AllegroVkMapping {
uint16 vk_from;
byte vk_count;
@@ -412,7 +422,7 @@ bool VideoDriver_Allegro::PollEvent()
*/
int _allegro_instance_count = 0;
const char *VideoDriver_Allegro::Start(const StringList &parm)
const char *VideoDriver_Allegro::Start(const StringList &param)
{
if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, nullptr)) {
DEBUG(driver, 0, "allegro: install_allegro failed '%s'", allegro_error);
@@ -440,6 +450,8 @@ const char *VideoDriver_Allegro::Start(const StringList &parm)
MarkWholeScreenDirty();
set_close_button_callback(HandleExitGameRequest);
this->is_game_threaded = !GetDriverParamBool(param, "no_threads") && !GetDriverParamBool(param, "no_thread");
return nullptr;
}
@@ -477,14 +489,16 @@ void VideoDriver_Allegro::InputLoop()
void VideoDriver_Allegro::MainLoop()
{
for (;;) {
if (_exit_game) return;
this->StartGameThread();
if (this->Tick()) {
this->Paint();
}
for (;;) {
if (_exit_game) break;
this->Tick();
this->SleepTillNextTick();
}
this->StopGameThread();
}
bool VideoDriver_Allegro::ChangeResolution(int w, int h)