mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	clang format
This commit is contained in:
		
							parent
							
								
									718f04af6d
								
							
						
					
					
						commit
						0dcb886ef2
					
				
					 2 changed files with 22 additions and 15 deletions
				
			
		|  | @ -46,7 +46,8 @@ private: | ||||||
| 
 | 
 | ||||||
| EmuWindow::EmuWindow() { | EmuWindow::EmuWindow() { | ||||||
|     // TODO: Find a better place to set this.
 |     // TODO: Find a better place to set this.
 | ||||||
|     config.min_client_area_size = std::make_pair(Core::kScreenTopWidth, Core::kScreenTopHeight + Core::kScreenBottomHeight); |     config.min_client_area_size = | ||||||
|  |         std::make_pair(Core::kScreenTopWidth, Core::kScreenTopHeight + Core::kScreenBottomHeight); | ||||||
|     active_config = config; |     active_config = config; | ||||||
|     touch_state = std::make_shared<TouchState>(); |     touch_state = std::make_shared<TouchState>(); | ||||||
|     Input::RegisterFactory<Input::TouchDevice>("emu_window", touch_state); |     Input::RegisterFactory<Input::TouchDevice>("emu_window", touch_state); | ||||||
|  | @ -152,35 +153,41 @@ void EmuWindow::UpdateCurrentFramebufferLayout(unsigned width, unsigned height) | ||||||
|     } else { |     } else { | ||||||
|         switch (Settings::values.layout_option) { |         switch (Settings::values.layout_option) { | ||||||
|         case Settings::LayoutOption::SingleScreen: |         case Settings::LayoutOption::SingleScreen: | ||||||
|             min_width = Settings::values.swap_screen ? Core::kScreenBottomWidth : Core::kScreenTopWidth; |             min_width = | ||||||
|  |                 Settings::values.swap_screen ? Core::kScreenBottomWidth : Core::kScreenTopWidth; | ||||||
|             min_height = Core::kScreenBottomHeight; |             min_height = Core::kScreenBottomHeight; | ||||||
|             layout = Layout::SingleFrameLayout(std::max(width, min_width), std::max(height, min_height), Settings::values.swap_screen, |             layout = Layout::SingleFrameLayout( | ||||||
|                                                Settings::values.upright_screen); |                 std::max(width, min_width), std::max(height, min_height), | ||||||
|  |                 Settings::values.swap_screen, Settings::values.upright_screen); | ||||||
|             break; |             break; | ||||||
|         case Settings::LayoutOption::LargeScreen: |         case Settings::LayoutOption::LargeScreen: | ||||||
|             min_width = Settings::values.swap_screen ? Core::kScreenTopWidth/4 + Core::kScreenBottomWidth : Core::kScreenTopWidth + Core::kScreenBottomWidth/4; |             min_width = Settings::values.swap_screen | ||||||
|  |                             ? Core::kScreenTopWidth / 4 + Core::kScreenBottomWidth | ||||||
|  |                             : Core::kScreenTopWidth + Core::kScreenBottomWidth / 4; | ||||||
|             min_height = Core::kScreenBottomHeight; |             min_height = Core::kScreenBottomHeight; | ||||||
|             layout = Layout::LargeFrameLayout(std::max(width, min_width), std::max(height, min_height), Settings::values.swap_screen, |             layout = Layout::LargeFrameLayout( | ||||||
|                                               Settings::values.upright_screen); |                 std::max(width, min_width), std::max(height, min_height), | ||||||
|  |                 Settings::values.swap_screen, Settings::values.upright_screen); | ||||||
|             break; |             break; | ||||||
|         case Settings::LayoutOption::SideScreen: |         case Settings::LayoutOption::SideScreen: | ||||||
|             min_width = Core::kScreenTopWidth + Core::kScreenBottomWidth; |             min_width = Core::kScreenTopWidth + Core::kScreenBottomWidth; | ||||||
|             min_height = Core::kScreenBottomHeight; |             min_height = Core::kScreenBottomHeight; | ||||||
|             layout = Layout::SideFrameLayout(std::max(width, min_width), std::max(height, min_height), Settings::values.swap_screen, |             layout = Layout::SideFrameLayout( | ||||||
|                                              Settings::values.upright_screen); |                 std::max(width, min_width), std::max(height, min_height), | ||||||
|  |                 Settings::values.swap_screen, Settings::values.upright_screen); | ||||||
|             break; |             break; | ||||||
|         case Settings::LayoutOption::Default: |         case Settings::LayoutOption::Default: | ||||||
|         default: |         default: | ||||||
|             min_width = Core::kScreenTopWidth; |             min_width = Core::kScreenTopWidth; | ||||||
|             min_height = Core::kScreenTopHeight + Core::kScreenBottomHeight; |             min_height = Core::kScreenTopHeight + Core::kScreenBottomHeight; | ||||||
|             layout = Layout::DefaultFrameLayout(std::max(width, min_width), std::max(height, min_height), Settings::values.swap_screen, |             layout = Layout::DefaultFrameLayout( | ||||||
|                                                 Settings::values.upright_screen); |                 std::max(width, min_width), std::max(height, min_height), | ||||||
|  |                 Settings::values.swap_screen, Settings::values.upright_screen); | ||||||
|             break; |             break; | ||||||
|         } |         } | ||||||
|         if(Settings::values.upright_screen){ |         if (Settings::values.upright_screen) { | ||||||
|             UpdateMinimumWindowSize(min_height, min_width); |             UpdateMinimumWindowSize(min_height, min_width); | ||||||
|         } |         } else { | ||||||
|         else{ |  | ||||||
|             UpdateMinimumWindowSize(min_width, min_height); |             UpdateMinimumWindowSize(min_width, min_height); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -216,7 +216,7 @@ private: | ||||||
|      */ |      */ | ||||||
|     std::tuple<unsigned, unsigned> ClipToTouchScreen(unsigned new_x, unsigned new_y) const; |     std::tuple<unsigned, unsigned> ClipToTouchScreen(unsigned new_x, unsigned new_y) const; | ||||||
| 
 | 
 | ||||||
|     void UpdateMinimumWindowSize(unsigned int min_width, unsigned int min_height){ |     void UpdateMinimumWindowSize(unsigned int min_width, unsigned int min_height) { | ||||||
|         WindowConfig new_config = config; |         WindowConfig new_config = config; | ||||||
|         new_config.min_client_area_size = std::make_pair(min_width, min_height); |         new_config.min_client_area_size = std::make_pair(min_width, min_height); | ||||||
|         SetConfig(new_config); |         SetConfig(new_config); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue