From 5990cb3b0295a013ab576c6586ac5f8b7cfc56f8 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Mon, 10 Mar 2025 02:22:16 +0200 Subject: [PATCH] ios: Remove printf spam --- src/core/renderer_mtl/renderer_mtl.cpp | 8 +++++--- src/ios_driver.mm | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/renderer_mtl/renderer_mtl.cpp b/src/core/renderer_mtl/renderer_mtl.cpp index 608d355d..308ad715 100644 --- a/src/core/renderer_mtl/renderer_mtl.cpp +++ b/src/core/renderer_mtl/renderer_mtl.cpp @@ -68,7 +68,6 @@ void RendererMTL::display() { MTL::Texture* texture = drawable->texture(); using namespace PICA::ExternalRegs; - printf("Layer pointer: %p\nDevice pointer: %p\nDrawable pointer: %p\nTexture pointer: %p\n", metalLayer, device, drawable, texture); // Top screen const u32 topActiveFb = externalRegs[Framebuffer0Select] & 1; @@ -103,16 +102,19 @@ void RendererMTL::display() { renderCommandEncoder->setRenderPipelineState(displayPipeline); renderCommandEncoder->setFragmentSamplerState(nearestSampler, 0); + const int xMultiplier = 2; + const int yMultiplier = 2; + // Top screen if (topScreen) { - renderCommandEncoder->setViewport(MTL::Viewport{0, 0, 400, 240, 0.0f, 1.0f}); + renderCommandEncoder->setViewport(MTL::Viewport{0, 0, 400 * xMultiplier, 240 * yMultiplier, 0.0f, 1.0f}); renderCommandEncoder->setFragmentTexture(topScreen->get().texture, 0); renderCommandEncoder->drawPrimitives(MTL::PrimitiveTypeTriangleStrip, NS::UInteger(0), NS::UInteger(4)); } // Bottom screen if (bottomScreen) { - renderCommandEncoder->setViewport(MTL::Viewport{40, 240, 320, 240, 0.0f, 1.0f}); + renderCommandEncoder->setViewport(MTL::Viewport{40 * xMultiplier, 240 * yMultiplier, 320 * xMultiplier, 240 * yMultiplier, 0.0f, 1.0f}); renderCommandEncoder->setFragmentTexture(bottomScreen->get().texture, 0); renderCommandEncoder->drawPrimitives(MTL::PrimitiveTypeTriangleStrip, NS::UInteger(0), NS::UInteger(4)); } diff --git a/src/ios_driver.mm b/src/ios_driver.mm index ed0d46a2..e3fd9342 100644 --- a/src/ios_driver.mm +++ b/src/ios_driver.mm @@ -31,10 +31,8 @@ IOS_EXPORT void iosCreateEmulator() { } IOS_EXPORT void iosRunFrame(CAMetalLayer* layer) { - printf("Running a frame\n"); void* layerBridged = (__bridge void*)layer; emulator->getRenderer()->setMTKLayer(layerBridged); emulator->runFrame(); - printf("Ran a frame\n"); } \ No newline at end of file