Add in-game option to switch fullscreen monitor (#1700)

* Add in-game option to switch fullscreen monitor

* mmm undefined memory :)

* Fix type consistency

* Optimize get_monitor and get_monitor_count since they're called often

* Address PR feedback

* Track fullscreen mode and minimized state to reduce GLFW calls per frame
This commit is contained in:
Ethan Lafrenais
2022-07-31 13:31:17 -04:00
committed by GitHub
parent 329bde229e
commit 88856ba5e0
19 changed files with 315 additions and 95 deletions
+7
View File
@@ -404,6 +404,13 @@ s64 get_screen_vmode_count() {
return Gfx::get_screen_vmode_count();
}
/*!
* Returns the number of available monitors.
*/
int get_monitor_count() {
return Gfx::get_monitor_count();
}
void mkdir_path(u32 filepath) {
auto filepath_str = std::string(Ptr<String>(filepath).c()->data());
file_util::create_dir_if_needed_for_file(filepath_str);