@@ -53,6 +53,19 @@ const IVStyle style =
5353const IVStyle titleStyle =
5454 DEFAULT_STYLE.WithValueText(IText(30 , COLOR_WHITE, " Michroma-Regular" )).WithDrawFrame(false ).WithShadowOffset(2 .f);
5555
56+ EMsgBoxResult _ShowMessageBox (iplug::igraphics::IGraphics* pGraphics, const char * str, const char * caption,
57+ EMsgBoxType type)
58+ {
59+ #ifdef OS_MAC
60+ // Apple is backwards?
61+ return pGraphics->ShowMessageBox (caption, str, type);
62+ #elif defined OS_WIN
63+ return pGraphics->ShowMessageBox (str, caption, type);
64+ #else
65+ #error NOT IMPLEMENTED
66+ #endif
67+ }
68+
5669
5770NeuralAmpModeler::NeuralAmpModeler (const InstanceInfo& info)
5871: Plugin(info, MakeConfig(kNumParams , kNumPresets ))
@@ -165,7 +178,7 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
165178 {
166179 std::stringstream ss;
167180 ss << " Failed to load NAM model. Message:\n\n " << msg;
168- GetUI ()-> ShowMessageBox ( ss.str ().c_str (), " Failed to load model!" , kMB_OK );
181+ _ShowMessageBox ( GetUI (), ss.str ().c_str (), " Failed to load model!" , kMB_OK );
169182 }
170183 std::cout << " Loaded: " << fileName.Get () << std::endl;
171184 }
@@ -183,7 +196,7 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
183196 message << " Failed to load IR file " << fileName.Get () << " :\n " ;
184197 message << dsp::wav::GetMsgForLoadReturnCode (retCode);
185198
186- GetUI ()-> ShowMessageBox ( message.str ().c_str (), " Failed to load IR!" , kMB_OK );
199+ _ShowMessageBox ( GetUI (), message.str ().c_str (), " Failed to load IR!" , kMB_OK );
187200 }
188201 }
189202 };
0 commit comments