libretro / dolphin

Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.
https://dolphin-emu.org/
GNU General Public License v2.0
84 stars 67 forks source link

ActionReplay::ARCode has no member named 'active' #280

Open rubin55 opened 1 year ago

rubin55 commented 1 year ago

I'm getting an error during build (branch "master"). I've followed the instructions in the README.md as follows:

git clone https://github.com/libretro/dolphin.git
mkdir build
cd build
cmake ..
make -j16

After a while of compiling I get this:

<snip>
[ 86%] Building CXX object Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/Settings.cpp.o
/opt/retroarch/build/libretro-super/libretro-dolphin/Source/Core/DolphinQt/CheatsManager.cpp: In member function 'void CheatsManager::GenerateARCode()':
/opt/retroarch/build/libretro-super/libretro-dolphin/Source/Core/DolphinQt/CheatsManager.cpp:297:11: error: 'struct ActionReplay::ARCode' has no member named 'active'
  297 |   ar_code.active = true;
      |           ^~~~~~
[ 86%] Building CXX object Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/ToolBar.cpp.o
[ 86%] Building CXX object Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/Translation.cpp.o
/opt/retroarch/build/libretro-super/libretro-dolphin/Source/Core/DolphinQt/RenderWidget.cpp: In member function 'void RenderWidget::OnFreeLookMouseMove(QMouseEvent*)':
/opt/retroarch/build/libretro-super/libretro-dolphin/Source/Core/DolphinQt/RenderWidget.cpp:244:35: warning: 'Qt::MidButton' is deprecated: MidButton is deprecated. Use MiddleButton instead [-Wdeprecated-declarations]
  244 |   else if (event->buttons() & Qt::MidButton)
      |                                   ^~~~~~~~~
In file included from /usr/include/qt5/QtCore/qcoreevent.h:43,
                 from /usr/include/qt5/QtCore/QEvent:1,
                 from /opt/retroarch/build/libretro-super/libretro-dolphin/Source/Core/DolphinQt/RenderWidget.h:7,
                 from /opt/retroarch/build/libretro-super/libretro-dolphin/Source/Core/DolphinQt/RenderWidget.cpp:5:
/usr/include/qt5/QtCore/qnamespace.h:132:9: note: declared here
  132 |         MidButton Q_DECL_ENUMERATOR_DEPRECATED_X("MidButton is deprecated. Use MiddleButton instead") = MiddleButton,
      |         ^~~~~~~~~
[ 87%] Building CXX object Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/WiiUpdate.cpp.o
make[2]: *** [Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/build.make:272: Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/CheatsManager.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1751: Source/Core/DolphinQt/CMakeFiles/dolphin-emu.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
ZackMattor commented 1 year ago

I am also getting this error and it's very strange. I dug into it a bit and it seems like these files haven't changed in quite some time...

https://github.com/libretro/dolphin/blob/master/Source/Core/Core/ActionReplay.h#L27-L34 https://github.com/libretro/dolphin/blob/master/Source/Core/DolphinQt/CheatsManager.cpp#L297

If I change ar_code.active to ar_code.enabled it does get past that compile error....

ZackMattor commented 1 year ago

Doh... All you need to do is turn ON this flag...

https://github.com/libretro/dolphin/blob/master/CMakeLists.txt#L39