LIJI32 / SameBoy

Game Boy and Game Boy Color emulator written in C
https://sameboy.github.io/
Other
1.64k stars 207 forks source link

check if file exists before running #588

Closed lesleyrs closed 7 months ago

lesleyrs commented 7 months ago

I built SameBoy on WSL, passed a wrong argument on cli and it sort of broke windows even though it was running through WSL gui which was surprising. I had to restart to stop the screen from glitching, wasn't able to reproduce it though.

I added a basic check for if a file exists, otherwise there's no point trying to run and spam console right? This still lets you pass incorrect files but I guess we still want to be able to run roms with incorrect header checksum.

Edit: Just saw that Windows does have a message box but it doesn't stop it from running, that's why on Linux if you don't get the messagebox it looks like there is no error. I'll close this since it's better to update GB_load_boot_rom