From fccfe0e0b4848fa38403b515d77b6aba37570e54 Mon Sep 17 00:00:00 2001 From: Oxore Date: Sat, 10 Jun 2023 13:26:58 +0300 Subject: Impl IO class with tracing, add VDP addr regs tracing --- graphics.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'graphics.cpp') diff --git a/graphics.cpp b/graphics.cpp index 56d0532..d193b50 100644 --- a/graphics.cpp +++ b/graphics.cpp @@ -21,8 +21,8 @@ Graphics::Graphics() _window = SDL_CreateWindow("Gut (SEGA MD/G emulator)", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, - VDP().kRenderWidth * kIntegerScaling, - VDP().kRenderHeight * kIntegerScaling, + VDP(0).kRenderWidth * kIntegerScaling, + VDP(0).kRenderHeight * kIntegerScaling, SDL_WINDOW_RESIZABLE); if (!_window) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError()); @@ -39,8 +39,8 @@ Graphics::Graphics() _renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, - VDP().kRenderWidth, - VDP().kRenderHeight); + VDP(0).kRenderWidth, + VDP(0).kRenderHeight); if (!_render_texture) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create texture: %s\n", SDL_GetError()); SDL_Quit(); @@ -85,9 +85,9 @@ void Graphics::Render(const VDP& vdp) // TODO probably should return and propagate error abort(); } - assert(pitch == VDP().kRenderWidth * sizeof(*buffer)); + assert(pitch == VDP(0).kRenderWidth * sizeof(*buffer)); (void) pitch; - memcpy(pixels, buffer, VDP().kRenderWidth * VDP().kRenderHeight * sizeof(*buffer)); + memcpy(pixels, buffer, VDP(0).kRenderWidth * VDP(0).kRenderHeight * sizeof(*buffer)); SDL_UnlockTexture(_render_texture); SDL_RenderClear(_renderer); SDL_RenderCopy(_renderer, _render_texture, NULL, NULL); -- cgit v1.2.3