Setting the window's name to the game's name

This commit is contained in:
AnonymusRaccoon
2020-02-04 15:51:50 +01:00
parent 250f01ec77
commit f93d505dc3
9 changed files with 86 additions and 9 deletions

View File

@@ -6,13 +6,15 @@
namespace ComSquare
{
SNES::SNES(const std::shared_ptr<Memory::MemoryBus> &bus, const std::string &romPath) :
SNES::SNES(const std::shared_ptr<Memory::MemoryBus> &bus, const std::string &romPath, Renderer::IRenderer &renderer) :
cpu(new CPU::CPU(bus)),
ppu(new PPU::PPU()),
apu(new APU::APU()),
cartridge(new Cartridge::Cartridge(romPath)),
wram(new Ram::Ram(16384))
wram(new Ram::Ram(16384)),
sram(new Ram::Ram(this->cartridge->header.sramSize))
{
bus->mapComponents(*this);
renderer.setWindowName(this->cartridge->header.gameName);
}
}