Skip to content

Commit

Permalink
nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
JustDoom committed Apr 17, 2024
1 parent 7d8c817 commit 859e414
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/emulator/Cpu.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
//
// Created by doom on 19/03/24.
//

#ifndef CPU_H
#define CPU_H

Expand All @@ -10,6 +6,7 @@
#include <iostream>
#include <random>
#include <vector>

#include "Keyboard.h"
#include "Renderer.h"
#include "Speaker.h"
Expand Down
9 changes: 4 additions & 5 deletions src/sfml/Emulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int Emulator::launch(const std::string &rom) {

sf::RenderWindow window(sf::VideoMode(64 * 15, 32 * 15), "8ChocChip - CHIP-8 Emulator", sf::Style::Titlebar | sf::Style::Close);
sf::Image icon;
icon.loadFromFile("../assets/icon.png");
icon.loadFromFile("../../assets/icon.png");
window.setIcon(64, 64, icon.getPixelsPtr());
window.setFramerateLimit(60);

Expand All @@ -43,12 +43,11 @@ int Emulator::launch(const std::string &rom) {
while (window.pollEvent(event)) {
if (event.type == sf::Event::Closed) {
window.close();
}

if (event.type == sf::Event::LostFocus)
} else if (event.type == sf::Event::LostFocus) {
focus = false;
else if (event.type == sf::Event::GainedFocus)
} else if (event.type == sf::Event::GainedFocus) {
focus = true;
}

if (!focus) continue;

Expand Down

0 comments on commit 859e414

Please sign in to comment.