mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	This commit is contained in:
		
							parent
							
								
									ab8d1c7d8b
								
							
						
					
					
						commit
						a8e4e11cd5
					
				
					 9 changed files with 180 additions and 132 deletions
				
			
		|  | @ -178,7 +178,7 @@ void EmuWindow::UpdateCurrentFramebufferLayout(unsigned width, unsigned height, | |||
|         layout_option.GetValue(), Settings::values.upright_screen.GetValue()); | ||||
| 
 | ||||
|     if (Settings::values.custom_layout.GetValue() == true) { | ||||
|         layout = Layout::CustomFrameLayout(width, height); | ||||
|         layout = Layout::CustomFrameLayout(width, height, Settings::values.swap_screen.GetValue()); | ||||
|     } else { | ||||
|         width = std::max(width, min_size.first); | ||||
|         height = std::max(height, min_size.second); | ||||
|  |  | |||
|  | @ -349,7 +349,7 @@ FramebufferLayout SeparateWindowsLayout(u32 width, u32 height, bool is_secondary | |||
|     return SingleFrameLayout(width, height, is_secondary, upright); | ||||
| } | ||||
| 
 | ||||
| FramebufferLayout CustomFrameLayout(u32 width, u32 height) { | ||||
| FramebufferLayout CustomFrameLayout(u32 width, u32 height, bool is_swapped) { | ||||
|     ASSERT(width > 0); | ||||
|     ASSERT(height > 0); | ||||
| 
 | ||||
|  | @ -364,8 +364,13 @@ FramebufferLayout CustomFrameLayout(u32 width, u32 height) { | |||
|                                       Settings::values.custom_bottom_right.GetValue(), | ||||
|                                       Settings::values.custom_bottom_bottom.GetValue()}; | ||||
| 
 | ||||
|     res.top_screen = top_screen; | ||||
|     res.bottom_screen = bot_screen; | ||||
|     if (is_swapped) { | ||||
|         res.top_screen = bot_screen; | ||||
|         res.bottom_screen = top_screen; | ||||
|     } else { | ||||
|         res.top_screen = top_screen; | ||||
|         res.bottom_screen = bot_screen; | ||||
|     } | ||||
|     return res; | ||||
| } | ||||
| 
 | ||||
|  | @ -375,7 +380,8 @@ FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale, bool is_secondar | |||
|         layout = CustomFrameLayout(std::max(Settings::values.custom_top_right.GetValue(), | ||||
|                                             Settings::values.custom_bottom_right.GetValue()), | ||||
|                                    std::max(Settings::values.custom_top_bottom.GetValue(), | ||||
|                                             Settings::values.custom_bottom_bottom.GetValue())); | ||||
|                                             Settings::values.custom_bottom_bottom.GetValue()), | ||||
|                                    Settings::values.swap_screen.GetValue()); | ||||
|     } else { | ||||
|         int width, height; | ||||
|         switch (Settings::values.layout_option.GetValue()) { | ||||
|  |  | |||
|  | @ -114,7 +114,7 @@ FramebufferLayout SeparateWindowsLayout(u32 width, u32 height, bool is_secondary | |||
|  * @param height Window framebuffer height in pixels | ||||
|  * @return Newly created FramebufferLayout object with default screen regions initialized | ||||
|  */ | ||||
| FramebufferLayout CustomFrameLayout(u32 width, u32 height); | ||||
| FramebufferLayout CustomFrameLayout(u32 width, u32 height, bool is_swapped); | ||||
| 
 | ||||
| /**
 | ||||
|  * Convenience method to get frame layout by resolution scale | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue