If the rotation attribute is missing from gamelist.xml and in-game titles are enabled, the rotation is fetched from MAME on game run.
However, this results in a crash if the game was added when the imperfect emulation flag was enabled, but when this flag has been subsequently disabled:
System.NullReferenceException: Object reference not set to an instance of an object.
at Mamesaver.Layout.LayoutBuilder.GetRotation(Game game) in C:\code\mamesaver-fork\Mamesaver\Layout\LayoutBuilder.cs:line 105
at Mamesaver.Layout.LayoutBuilder.EnsureLayout(Game game, Int32 monitorWidth, Int32 monitorHeight) in C:\code\mamesaver-fork\Mamesaver\Layout\LayoutBuilder.cs:line 52
at Mamesaver.MameScreen.RunGame() in C:\code\mamesaver-fork\Mamesaver\MameScreen.cs:line 352
at Mamesaver.MameScreen.SplashTimerTick(Object sender, EventArgs e) in C:\code\mamesaver-fork\Mamesaver\MameScreen.cs:line 212
A reasonable fix would be to pass a flag to skip the status check when calling GetRomDetails() in-game.
If the
rotation
attribute is missing fromgamelist.xml
and in-game titles are enabled, the rotation is fetched from MAME on game run.However, this results in a crash if the game was added when the imperfect emulation flag was enabled, but when this flag has been subsequently disabled:
A reasonable fix would be to pass a flag to skip the status check when calling
GetRomDetails()
in-game.