Skip to content

Commit

Permalink
Merge pull request #25 from EIRTeam/fix_render_thread
Browse files Browse the repository at this point in the history
Force never using RENDER_SEPARATE_THREAD because it's broken on switch
  • Loading branch information
Stary2001 committed Jul 11, 2021
2 parents d5f52f6 + 487b8e1 commit a7667c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions platform/switch/os_switch.cpp
Expand Up @@ -233,6 +233,13 @@ OS::VideoMode OS_Switch::get_video_mode(int p_screen) const {

void OS_Switch::get_fullscreen_mode_list(List<OS::VideoMode> *p_list, int p_screen) const {}

OS::RenderThreadMode OS_Switch::get_render_thread_mode() const {
if (OS::get_render_thread_mode() == OS::RenderThreadMode::RENDER_SEPARATE_THREAD) {
return OS::RENDER_THREAD_SAFE;
}
return OS::get_render_thread_mode();
}

int OS_Switch::get_current_video_driver() const {
return video_driver_index;
}
Expand Down
1 change: 1 addition & 0 deletions platform/switch/os_switch.h
Expand Up @@ -73,6 +73,7 @@ class OS_Switch : public OS {
virtual void set_video_mode(const VideoMode &p_video_mode, int p_screen);
virtual VideoMode get_video_mode(int p_screen) const;
virtual void get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen) const;
OS::RenderThreadMode get_render_thread_mode() const;

virtual int get_current_video_driver() const;
virtual Size2 get_window_size() const;
Expand Down

0 comments on commit a7667c9

Please sign in to comment.