I tried to update my MFD to Orbiter 2016 and struggle. Orber (no mods, just D3D9Client2016-R1) just crashes when loading any scene with my module activated.
Of course I used the new SDK paths to compile. My first thought was to update to newer IDE version also, but I was not in the need and canceled that idea. I managed to break down to a version that is running, just having a return early in critical methods.
The running version displays the title, button labels and even reacts to pressed buttons.
It crashes when I uncomment one of following lines:
I looked up the new MFDTemplate if there's something new, but there isn't.
Maybe I'm the only one that thinks writing text is essential...
This one even crashes when my HoverModule (class HoverModule : public oapi::Module) is really doing NOTHING AT ALL! So I skipped this line for all other tests.
What's going on here?
I felt very happy noticing great news about Orbiter but that stops my excitement right away
---------- Post added at 23:03 ---------- Previous post was at 04:22 ----------
Still don't know what was going on, but solved the problem like this, maybe someone needs to reproduce:
- opened MFDTemplate from new Orbiter 2016 SDK
- tested that this does work
- extended to use described no-content-module, tested successfully
- understood property sheets at last
- copied MFDTemplate and property sheets to my usual projects folder
- fixed solution to match new path for property sheets
- renamed folder, solution and project to HoverMFD (file and text content)
- put all my old .cpp and .h files in and added to project
- compiled and tested
So I somehow made the project to match a clean fresh start on new version but kept the old content.
Now I used property sheets correctly, as far as I read this will make installing 2008 redist unneccessary?
Then again thought about upgrading to newer IDE, but realized .vsprops files are not supported in modern vstudio, files need to be .props. Tried migrating the new built project WITH vsprops so vstudio should convert them. But I got errors about some (?) properties not being supported and decided to not have the time to dig in.
I will now need to do some adjustments:
- drawing rectangles does not work or works differently
- altitude reading below zero at Brighton Beach
- test and maybe think about ground elevation stuff
Of course I used the new SDK paths to compile. My first thought was to update to newer IDE version also, but I was not in the need and canceled that idea. I managed to break down to a version that is running, just having a return early in critical methods.
The running version displays the title, button labels and even reacts to pressed buttons.
It crashes when I uncomment one of following lines:
Code:
bool HoverMFD::Update (oapi::Sketchpad *skp)
{
Title (skp, "Hover MFD 1.1.1 2016");
// taken from MFDTemplate for testing:
skp->SetFont (font1);
skp->SetTextAlign (oapi::Sketchpad::CENTER,
oapi::Sketchpad::BASELINE);
skp->SetTextColor (0x00FFFF);
skp->Text (W/2, H/2,"Display area", 12); // CRASH HERE
// commented all the rest anyway
}
Maybe I'm the only one that thinks writing text is essential...
Code:
DLLCLBK void InitModule (HINSTANCE hDLL)
{
static char *name = "HoverMFD";
MFDMODESPECEX spec;
spec.name = name;
spec.key = OAPI_KEY_T;
spec.context = NULL;
spec.msgproc = HoverMFD::MsgProc;
g_MFDmode = oapiRegisterMFDMode (spec);
g_HoverModule = new HoverModule(hDLL);
oapiRegisterModule(g_HoverModule); // CRASH HERE
}
What's going on here?
I felt very happy noticing great news about Orbiter but that stops my excitement right away
---------- Post added at 23:03 ---------- Previous post was at 04:22 ----------
Still don't know what was going on, but solved the problem like this, maybe someone needs to reproduce:
- opened MFDTemplate from new Orbiter 2016 SDK
- tested that this does work
- extended to use described no-content-module, tested successfully
- understood property sheets at last
- copied MFDTemplate and property sheets to my usual projects folder
- fixed solution to match new path for property sheets
- renamed folder, solution and project to HoverMFD (file and text content)
- put all my old .cpp and .h files in and added to project
- compiled and tested
So I somehow made the project to match a clean fresh start on new version but kept the old content.
Now I used property sheets correctly, as far as I read this will make installing 2008 redist unneccessary?
Then again thought about upgrading to newer IDE, but realized .vsprops files are not supported in modern vstudio, files need to be .props. Tried migrating the new built project WITH vsprops so vstudio should convert them. But I got errors about some (?) properties not being supported and decided to not have the time to dig in.
I will now need to do some adjustments:
- drawing rectangles does not work or works differently
- altitude reading below zero at Brighton Beach
- test and maybe think about ground elevation stuff