mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-08 12:01:39 +12:00
Migrating from SFML to SDL2 && switching Boost to a submodule
This commit is contained in:
parent
4395013118
commit
cdac2526a7
3321 changed files with 38 additions and 725135 deletions
|
@ -159,7 +159,7 @@ void GPU::drawVertices(OpenGL::Primitives primType, Vertex* vertices, u32 count)
|
|||
}
|
||||
|
||||
constexpr u32 topScreenBuffer = 0x1f000000;
|
||||
constexpr u32 bottomScreenBuffer = 0x1f300000;
|
||||
constexpr u32 bottomScreenBuffer = 0x1f05dc00;
|
||||
|
||||
// Quick hack to display top screen for now
|
||||
void GPU::display() {
|
||||
|
|
|
@ -22,7 +22,7 @@ void Emulator::render() {
|
|||
}
|
||||
|
||||
void Emulator::run() {
|
||||
while (window.isOpen()) {
|
||||
while (running) {
|
||||
gpu.getGraphicsContext(); // Give the GPU a rendering context
|
||||
runFrame(); // Run 1 frame of instructions
|
||||
gpu.display(); // Display graphics
|
||||
|
@ -30,16 +30,17 @@ void Emulator::run() {
|
|||
// Send VBlank interrupts
|
||||
kernel.sendGPUInterrupt(GPUInterrupt::VBlank0);
|
||||
kernel.sendGPUInterrupt(GPUInterrupt::VBlank1);
|
||||
window.display();
|
||||
|
||||
sf::Event event;
|
||||
while (window.pollEvent(event)) {
|
||||
if (event.type == sf::Event::Closed) {
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent(&event)) {
|
||||
if (event.type == SDL_QUIT) {
|
||||
printf("Bye :(\n");
|
||||
window.close();
|
||||
running = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_GL_SwapWindow(window);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue