Refactor bitmap palette management across various components to streamline palette setting and improve error handling; remove unnecessary status checks and enhance consistency in palette application methods.
This commit is contained in:
@@ -60,9 +60,7 @@ class Renderer {
|
||||
const std::vector<uint8_t> &data,
|
||||
gfx::Bitmap &bitmap, gfx::SnesPalette &palette) {
|
||||
bitmap.Create(width, height, depth, data);
|
||||
if (!bitmap.SetPalette(palette).ok()) {
|
||||
throw std::runtime_error("Failed to set palette");
|
||||
}
|
||||
bitmap.SetPalette(palette);
|
||||
RenderBitmap(&bitmap);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user