Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot select Pravets 82 #415
A colleague of mine actually used a Pravets 82 so I wanted to show him AppleWin emulating the Pravets 82, but it cannot be selected, giving this error
"A specific clone wasn't selected from the Advanced tab"
The other clones work.
The reason is in this commit 749e151 for Common.h
This is the enum eApple2Type
You can see that the value of Pravets82 is eventually the same as A2TYPE_CLONE which is forbidden in CPropertySheetHelper::PostMsgAfterClose.
The correct code should look like (I think)
Unless you are worried that these values are persisted and should not be changed, in which case the Pravets82 should go at the end and get a new number.
Thanks for the report & triage.
And the check for
Yes, this sounds like a reasonable solution.
NB1. A Registry key "Apple2 Type" with value of 256 (A2TYPE_CLONE) is allowed to be read on startup in
If we change the enum, then we must trap this 256 (A2TYPE_CLONE) at start-up, and convert it to the correct (new) value of A2TYPE_PRAVETS82.
NB2. The save-state persists the "Model" using a string, eg. "Pravets82", so it is not affected. But when (a model=Pravets82) is loaded then currently will write 256 to the Registry. If we change the enum, then it will write out the correct value.
So given these points, it still seems reasonable to just move Pravet82 to the end of the enum definition.
Actually there is a gap in the eApple2Type enums after A2TYPE_PRAVETS8M where it then jumps to the //e clones, so I'll just put A2TYPE_PRAVETS82 immediately after A2TYPE_PRAVETS8M.
Possible compatibility scenarios: