mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	GPU: Updated horizontal sync line counter to use framebuffer height.
This commit is contained in:
		
							parent
							
								
									d4bd2f2e5d
								
							
						
					
					
						commit
						7ada2625fe
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -252,17 +252,18 @@ template void Write<u8>(u32 addr, const u8 data); | ||||||
| 
 | 
 | ||||||
| /// Update hardware
 | /// Update hardware
 | ||||||
| void Update() { | void Update() { | ||||||
|  |     auto& framebuffer_top = g_regs.Get<Regs::FramebufferTop>(); | ||||||
|     u64 current_ticks = Core::g_app_core->GetTicks(); |     u64 current_ticks = Core::g_app_core->GetTicks(); | ||||||
| 
 | 
 | ||||||
|     // Synchronize line...
 |     // Synchronize line...
 | ||||||
|     if ((current_ticks - g_last_ticks) >= GPU::kFrameTicks / 400) { |     if ((current_ticks - g_last_ticks) >= GPU::kFrameTicks / framebuffer_top.height) { | ||||||
|         GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC0); |         GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC0); | ||||||
|         g_cur_line++; |         g_cur_line++; | ||||||
|         g_last_ticks = current_ticks; |         g_last_ticks = current_ticks; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // Synchronize frame...
 |     // Synchronize frame...
 | ||||||
|     if (g_cur_line >= 400) { |     if (g_cur_line >= framebuffer_top.height) { | ||||||
|         g_cur_line = 0; |         g_cur_line = 0; | ||||||
|         GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC1); |         GSP_GPU::SignalInterrupt(GSP_GPU::InterruptId::PDC1); | ||||||
|         VideoCore::g_renderer->SwapBuffers(); |         VideoCore::g_renderer->SwapBuffers(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue