mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	qimageinterface fixes, remove old lodepng, address more comments
This commit is contained in:
		
							parent
							
								
									93aab2c109
								
							
						
					
					
						commit
						391e552927
					
				
					 10 changed files with 32 additions and 7959 deletions
				
			
		|  | @ -18,8 +18,19 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent) | |||
|     SetConfiguration(); | ||||
| 
 | ||||
|     ui->hw_renderer_group->setEnabled(ui->toggle_hw_renderer->isChecked()); | ||||
|     connect(ui->toggle_hw_renderer, &QCheckBox::toggled, ui->hw_renderer_group, | ||||
|             &QWidget::setEnabled); | ||||
|     connect(ui->toggle_hw_renderer, &QCheckBox::toggled, this, [this] { | ||||
|         auto checked = ui->toggle_hw_renderer->isChecked(); | ||||
|         ui->hw_renderer_group->setEnabled(checked); | ||||
|         ui->toggle_custom_textures->setEnabled(checked); | ||||
|         ui->toggle_dump_textures->setEnabled(checked); | ||||
|         ui->toggle_preload_textures->setEnabled(checked); | ||||
|         if (!checked) { | ||||
|             ui->toggle_custom_textures->setChecked(false); | ||||
|             ui->toggle_dump_textures->setChecked(false); | ||||
|             ui->toggle_preload_textures->setChecked(false); | ||||
|         } | ||||
|     }); | ||||
| 
 | ||||
|     ui->hw_shader_group->setEnabled(ui->toggle_hw_shader->isChecked()); | ||||
|     connect(ui->toggle_hw_shader, &QCheckBox::toggled, ui->hw_shader_group, &QWidget::setEnabled); | ||||
| #ifdef __APPLE__ | ||||
|  |  | |||
|  | @ -340,7 +340,7 @@ | |||
|          <string><html><head/><body><p>Replace textures with PNG files.</p><p>Textures are loaded from load/textures/[Title ID]/.</p></body></html></string> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string>Use Custom Textures (Hardware Renderer only)</string> | ||||
|          <string>Use Custom Textures</string> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|  | @ -350,7 +350,7 @@ | |||
|          <string><html><head/><body><p>Dump textures to PNG files.</p><p>Textures are dumped to dump/textures/[Title ID]/.</p></body></html></string> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string>Dump Textures (Hardware Renderer only)</string> | ||||
|          <string>Dump Textures</string> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|  |  | |||
|  | @ -21,9 +21,9 @@ bool QtImageInterface::DecodePNG(std::vector<u8>& dst, u32& width, u32& height, | |||
|     height = image.height(); | ||||
| 
 | ||||
|     // Write RGBA8 to vector
 | ||||
|     for (u32 y = 1; y < image.height() + 1; y++) { | ||||
|         for (u32 x = 1; x < image.width() + 1; x++) { | ||||
|             const QColor pixel(image.pixel(y, x)); | ||||
|     for (int y = 0; y < image.height(); y++) { | ||||
|         for (int x = 0; x < image.width(); x++) { | ||||
|             const QColor pixel(image.pixelColor(x, y)); | ||||
|             dst.push_back(pixel.red()); | ||||
|             dst.push_back(pixel.green()); | ||||
|             dst.push_back(pixel.blue()); | ||||
|  | @ -38,7 +38,7 @@ bool QtImageInterface::EncodePNG(const std::string& path, const std::vector<u8>& | |||
|                                  u32 height) { | ||||
|     QImage image(src.data(), width, height, QImage::Format_RGBA8888); | ||||
| 
 | ||||
|     if (!image.save(QString::fromStdString(path))) { | ||||
|     if (!image.save(QString::fromStdString(path), "PNG")) { | ||||
|         LOG_ERROR(Frontend, "Failed to save {}", path); | ||||
|         return false; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue