SourMesen / Mesen-S

Mesen-S is a cross-platform (Windows & Linux) SNES emulator built in C++ and C#
GNU General Public License v3.0
415 stars 102 forks source link

[Lua] emu.getState() returns PPU H-Clock instead of scanline. #80

Closed tewtal closed 4 years ago

tewtal commented 4 years ago

There's a problem in the getState() Lua function that overwrites the scanline count with the H-Clock due to the same name being used in the code.

From LuaApi::GetState:

lua_pushintvalue(scanline, state.Ppu.Scanline);

lua_pushintvalue(scanline, state.Ppu.HClock);

SourMesen commented 4 years ago

Thanks for the report! This is fixed.