Skip to content

Commit 11a8834

Browse files
committed
Revert to standard LoadBitmap - test if file-based loading works
Going back to the original approach used in main branch. File-based loading (nvgCreateImage) might work better than memory-based (nvgCreateImageMem). The LoadBitmapFromMemory function is still there but not used by default.
1 parent 6f2b790 commit 11a8834

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

NeuralAmpModeler/NeuralAmpModeler.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,14 @@ NeuralAmpModeler::NeuralAmpModeler(const InstanceInfo& info)
225225
const auto irIconOnSVG = pGraphics->LoadSVG(IR_ICON_ON_FN);
226226
const auto irIconOffSVG = pGraphics->LoadSVG(IR_ICON_OFF_FN);
227227

228-
// Use memory-based bitmap loading on macOS to avoid file access issues
229-
const auto backgroundBitmap = LoadBitmapFromMemory(pGraphics, BACKGROUND_FN);
230-
const auto fileBackgroundBitmap = LoadBitmapFromMemory(pGraphics, FILEBACKGROUND_FN);
231-
const auto inputLevelBackgroundBitmap = LoadBitmapFromMemory(pGraphics, INPUTLEVELBACKGROUND_FN);
232-
const auto linesBitmap = LoadBitmapFromMemory(pGraphics, LINES_FN);
233-
const auto knobBackgroundBitmap = LoadBitmapFromMemory(pGraphics, KNOBBACKGROUND_FN);
234-
const auto switchHandleBitmap = LoadBitmapFromMemory(pGraphics, SLIDESWITCHHANDLE_FN);
235-
const auto meterBackgroundBitmap = LoadBitmapFromMemory(pGraphics, METERBACKGROUND_FN);
228+
// Try standard bitmap loading first - this works on non-sandboxed apps and Windows
229+
const auto backgroundBitmap = pGraphics->LoadBitmap(BACKGROUND_FN);
230+
const auto fileBackgroundBitmap = pGraphics->LoadBitmap(FILEBACKGROUND_FN);
231+
const auto inputLevelBackgroundBitmap = pGraphics->LoadBitmap(INPUTLEVELBACKGROUND_FN);
232+
const auto linesBitmap = pGraphics->LoadBitmap(LINES_FN);
233+
const auto knobBackgroundBitmap = pGraphics->LoadBitmap(KNOBBACKGROUND_FN);
234+
const auto switchHandleBitmap = pGraphics->LoadBitmap(SLIDESWITCHHANDLE_FN);
235+
const auto meterBackgroundBitmap = pGraphics->LoadBitmap(METERBACKGROUND_FN);
236236

237237
const auto b = pGraphics->GetBounds();
238238
const auto mainArea = b.GetPadded(-20);

0 commit comments

Comments
 (0)