resizable window
This commit is contained in:
@@ -181,7 +181,6 @@ public:
|
|||||||
return memoryLayout.TMA;
|
return memoryLayout.TMA;
|
||||||
case 0xFF07:
|
case 0xFF07:
|
||||||
return memoryLayout.TAC | 0xF8;
|
return memoryLayout.TAC | 0xF8;
|
||||||
;
|
|
||||||
case 0xFF0F:
|
case 0xFF0F:
|
||||||
return memoryLayout.IF | 0xE0;
|
return memoryLayout.IF | 0xE0;
|
||||||
case 0xFF10:
|
case 0xFF10:
|
||||||
|
|||||||
@@ -369,9 +369,9 @@ void GameBoy::drawLine() {
|
|||||||
|
|
||||||
void GameBoy::SDL2setup() {
|
void GameBoy::SDL2setup() {
|
||||||
SDL_Init(SDL_INIT_EVERYTHING);
|
SDL_Init(SDL_INIT_EVERYTHING);
|
||||||
screen =
|
screen = SDL_CreateWindow("GameBoy++", SDL_WINDOWPOS_UNDEFINED,
|
||||||
SDL_CreateWindow("GameBoy++", SDL_WINDOWPOS_UNDEFINED,
|
SDL_WINDOWPOS_UNDEFINED, RESOLUTION_X, RESOLUTION_Y,
|
||||||
SDL_WINDOWPOS_UNDEFINED, RESOLUTION_X, RESOLUTION_Y, 0);
|
SDL_WINDOW_RESIZABLE);
|
||||||
|
|
||||||
// Create an SDL renderer to draw on the window
|
// Create an SDL renderer to draw on the window
|
||||||
renderer = SDL_CreateRenderer(
|
renderer = SDL_CreateRenderer(
|
||||||
@@ -395,6 +395,7 @@ void GameBoy::SDL2present() {
|
|||||||
RESOLUTION_X * sizeof(uint32_t));
|
RESOLUTION_X * sizeof(uint32_t));
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
SDL_RenderCopy(renderer, texture, nullptr, nullptr);
|
SDL_RenderCopy(renderer, texture, nullptr, nullptr);
|
||||||
|
SDL_RenderSetLogicalSize(renderer, RESOLUTION_X, RESOLUTION_Y);
|
||||||
|
|
||||||
frameTime = SDL_GetTicks() - frameStart;
|
frameTime = SDL_GetTicks() - frameStart;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user