Fix border slightly
This commit is contained in:
parent
b55b6880a5
commit
c10b9ce940
|
@ -6,7 +6,6 @@
|
||||||
#include <PSX/Timer/frame_timer.hpp>
|
#include <PSX/Timer/frame_timer.hpp>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
// TODO: The border is missing
|
|
||||||
namespace ScreenCenter {
|
namespace ScreenCenter {
|
||||||
using namespace JabyEngine;
|
using namespace JabyEngine;
|
||||||
using GenericButton = Periphery::GenericController::Button;
|
using GenericButton = Periphery::GenericController::Button;
|
||||||
|
|
|
@ -87,11 +87,15 @@ namespace JabyEngine {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Display :: set_offset(int16_t x, int16_t y) {
|
void Display :: set_offset(int16_t x, int16_t y) {
|
||||||
|
// Todo: Apply these in a better way or never?
|
||||||
|
static constexpr auto PS3_CorrectionX = 0; // 2
|
||||||
|
static constexpr auto PS3_CorrectionY = 0; // 1
|
||||||
|
|
||||||
x += internal::Display::DisplayRange.x;
|
x += internal::Display::DisplayRange.x;
|
||||||
y += internal::Display::DisplayRange.y;
|
y += internal::Display::DisplayRange.y;
|
||||||
|
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::HorizontalDisplayRange((x << 3), (x + Display::Width) << 3));
|
GPU_IO::GP1.write(GPU_IO::Command::HorizontalDisplayRange((x << 3), (x + Display::Width + PS3_CorrectionX) << 3));
|
||||||
GPU_IO::GP1.write(GPU_IO::Command::VerticalDisplayRange(y, y + Display::Height));
|
GPU_IO::GP1.write(GPU_IO::Command::VerticalDisplayRange(y, y + Display::Height + PS3_CorrectionY));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t swap_buffers_vsync(uint8_t syncs, bool clear_screen) {
|
uint8_t swap_buffers_vsync(uint8_t syncs, bool clear_screen) {
|
||||||
|
|
Loading…
Reference in New Issue