feat: Implement lazy initialization for Emulator and Renderer
- Updated Emulator to support optional lazy initialization of the renderer, enhancing flexibility during runtime. - Introduced a new method in IRenderer for creating textures with specific pixel formats, improving texture management for the emulator. - Refactored texture command processing in Arena to handle empty queues more gracefully. - Enhanced SDL2Renderer to support the new texture creation method, ensuring compatibility with emulator requirements.
This commit is contained in:
@@ -33,7 +33,7 @@ void Arena::QueueTextureCommand(TextureCommandType type, Bitmap* bitmap) {
|
||||
}
|
||||
|
||||
void Arena::ProcessTextureQueue(IRenderer* renderer) {
|
||||
if (!renderer_) return;
|
||||
if (!renderer_ || texture_command_queue_.empty()) return;
|
||||
|
||||
for (const auto& command : texture_command_queue_) {
|
||||
switch (command.type) {
|
||||
|
||||
Reference in New Issue
Block a user