summaryrefslogtreecommitdiff
path: root/opengl/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/main.cpp')
-rw-r--r--opengl/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/opengl/main.cpp b/opengl/main.cpp
index 82bf991..7ded832 100644
--- a/opengl/main.cpp
+++ b/opengl/main.cpp
@@ -41,6 +41,10 @@ static int Execute(msModel* model)
W32DLib::Common::Initialise();
W32DLib::Common::MessageTitle("Simple OpenGL");
+ // Unfortunately this is the best you can hope for with Milkshape...
+ //
+ HWND parent=GetForegroundWindow();
+
if (!model)
{
return -1;
@@ -48,17 +52,17 @@ static int Execute(msModel* model)
if (msModel_GetMeshCount(model)<1)
{
- W32DLib::Common::Error(NULL,NULL,"No meshes in the model!");
+ W32DLib::Common::Error(parent,0,"No meshes in the model!");
return 0;
}
Generate gen(model);
GLDialog dlg(gen);
- if (dlg.ShowModal(W32DLib::Common::GetInstance(),NULL)==IDOK)
+ if (dlg.ShowModal(W32DLib::Common::GetInstance(),parent)==IDOK)
{
SetCursor(LoadCursor(NULL,IDC_WAIT));
- gen.MakeFiles();
+ gen.MakeFiles(parent);
SetCursor(LoadCursor(NULL,IDC_ARROW));
}