aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorCameron Cawley2019-12-31 19:19:42 +0000
committerFilippos Karapetis2020-01-11 17:34:12 +0200
commit948c555ea616821ed7c2678ad406ed5bea392339 (patch)
tree000a4566cd70bdddff6d8f4d64edfc3db9119ac5 /graphics/macgui
parent395f707203e8f30add0b2f8e9d8616dd12468676 (diff)
downloadscummvm-rg350-948c555ea616821ed7c2678ad406ed5bea392339.tar.gz
scummvm-rg350-948c555ea616821ed7c2678ad406ed5bea392339.tar.bz2
scummvm-rg350-948c555ea616821ed7c2678ad406ed5bea392339.zip
ALL: Create all instances of NEResources and PEResources using new instead of on the stack
Also adapted WinCursorGroup and MacMenu to reflect this.
Diffstat (limited to 'graphics/macgui')
-rw-r--r--graphics/macgui/macmenu.cpp5
-rw-r--r--graphics/macgui/macmenu.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index 2c9b3f0902..b79ba8cfbc 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -24,6 +24,7 @@
#include "common/stack.h"
#include "common/keyboard.h"
#include "common/macresman.h"
+#include "common/winexe_pe.h"
#include "graphics/primitives.h"
#include "graphics/font.h"
@@ -200,8 +201,8 @@ static Common::U32String readUnicodeString(Common::SeekableReadStream *stream) {
}
-MacMenu *MacMenu::createMenuFromPEexe(Common::PEResources &exe, MacWindowManager *wm) {
- Common::SeekableReadStream *menuData = exe.getResource(Common::kWinMenu, 128);
+MacMenu *MacMenu::createMenuFromPEexe(Common::PEResources *exe, MacWindowManager *wm) {
+ Common::SeekableReadStream *menuData = exe->getResource(Common::kWinMenu, 128);
if (!menuData)
return nullptr;
diff --git a/graphics/macgui/macmenu.h b/graphics/macgui/macmenu.h
index c8633c0cc7..13d374d084 100644
--- a/graphics/macgui/macmenu.h
+++ b/graphics/macgui/macmenu.h
@@ -24,11 +24,11 @@
#define GRAPHICS_MACGUI_MACMENU_H
#include "common/str-array.h"
-#include "common/winexe_pe.h"
namespace Common {
class U32String;
class MacResManager;
+class PEResources;
}
namespace Graphics {
@@ -51,7 +51,7 @@ public:
~MacMenu();
static Common::StringArray *readMenuFromResource(Common::SeekableReadStream *res);
- static MacMenu *createMenuFromPEexe(Common::PEResources &exe, MacWindowManager *wm);
+ static MacMenu *createMenuFromPEexe(Common::PEResources *exe, MacWindowManager *wm);
void setCommandsCallback(void (*callback)(int, Common::String &, void *), void *data) { _ccallback = callback; _cdata = data; }
void setCommandsCallback(void (*callback)(int, Common::U32String &, void *), void *data) { _unicodeccallback = callback; _cdata = data; }