mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	citra-qt: Properly specify the framebuffer format.
This commit is contained in:
		
							parent
							
								
									884b681cca
								
							
						
					
					
						commit
						88df3fbf27
					
				
					 2 changed files with 28 additions and 3 deletions
				
			
		|  | @ -184,8 +184,32 @@ void GraphicsFramebufferWidget::OnUpdate() | ||||||
|         framebuffer_address = framebuffer.GetColorBufferPhysicalAddress(); |         framebuffer_address = framebuffer.GetColorBufferPhysicalAddress(); | ||||||
|         framebuffer_width = framebuffer.GetWidth(); |         framebuffer_width = framebuffer.GetWidth(); | ||||||
|         framebuffer_height = framebuffer.GetHeight(); |         framebuffer_height = framebuffer.GetHeight(); | ||||||
|         // TODO: It's unknown how this format is actually specified
 | 
 | ||||||
|         framebuffer_format = Format::RGBA8; |         switch (framebuffer.color_format) { | ||||||
|  |         case Pica::Regs::ColorFormat::RGBA8: | ||||||
|  |             framebuffer_format = Format::RGBA8; | ||||||
|  |             break; | ||||||
|  | 
 | ||||||
|  |         case Pica::Regs::ColorFormat::RGB8: | ||||||
|  |             framebuffer_format = Format::RGB8; | ||||||
|  |             break; | ||||||
|  | 
 | ||||||
|  |         case Pica::Regs::ColorFormat::RGB5A1: | ||||||
|  |             framebuffer_format = Format::RGB5A1; | ||||||
|  |             break; | ||||||
|  | 
 | ||||||
|  |         case Pica::Regs::ColorFormat::RGB565: | ||||||
|  |             framebuffer_format = Format::RGB565; | ||||||
|  |             break; | ||||||
|  | 
 | ||||||
|  |         case Pica::Regs::ColorFormat::RGBA4: | ||||||
|  |             framebuffer_format = Format::RGBA4; | ||||||
|  |             break; | ||||||
|  | 
 | ||||||
|  |         default: | ||||||
|  |             framebuffer_format = Format::Unknown; | ||||||
|  |             break; | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         break; |         break; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -35,7 +35,8 @@ class GraphicsFramebufferWidget : public BreakPointObserverDock { | ||||||
|         RGBA4    = 4, |         RGBA4    = 4, | ||||||
|         D16      = 5, |         D16      = 5, | ||||||
|         D24      = 6, |         D24      = 6, | ||||||
|         D24S8    = 7 |         D24S8    = 7, | ||||||
|  |         Unknown  = 8 | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     static u32 BytesPerPixel(Format format); |     static u32 BytesPerPixel(Format format); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue