punesemu / puNES

Qt-based Nintendo Entertaiment System emulator and NSF/NSF2/NSFe Music Player (Linux, FreeBSD, OpenBSD and Windows)
GNU General Public License v2.0
656 stars 42 forks source link

Compilation failure with disabled FULLSCREEN_RESFREQ #388

Closed winterheart closed 8 months ago

winterheart commented 8 months ago

Compilation fails if FULLSCREEN_RESFREQ disabled:

FAILED: src/CMakeFiles/punes.dir/gui/wdgOverlayUi.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DGLEW_STATIC -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DRELEASE -DWITH_OPENGL -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111_build/src/punes_autogen/include -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/. -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/audio -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/core -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/gui -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/video/opengl -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/video/shaders -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111_build -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/gui/linux -I/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/extra/qkeycode/include -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtSvg  -O2 -march=x86-64 -pipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -std=gnu++14 -ffast-math -fPIC -MD -MT src/CMakeFiles/punes.dir/gui/wdgOverlayUi.cpp.o -MF src/CMakeFiles/punes.dir/gui/wdgOverlayUi.cpp.o.d -o src/CMakeFiles/punes.dir/gui/wdgOverlayUi.cpp.o -c /var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/gui/wdgOverlayUi.cpp
/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/gui/wdgOverlayUi.cpp: In member function ‘virtual void overlayWidgetInputPort::update_old_value()’:
/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/gui/wdgOverlayUi.cpp:1087:25: error: ‘_input_lfud_standard_controller’ was not declared in this scope
 1087 |                         _input_lfud_standard_controller axes;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/gui/wdgOverlayUi.cpp:1089:59: error: ‘axes’ was not declared in this scope
 1089 |                         input_rotate_standard_controller(&axes);
      |                                                           ^~~~
/var/tmp/portage/app-emulation/punes-0.111/work/puNES-0.111/src/gui/wdgOverlayUi.cpp:1089:25: error: ‘input_rotate_standard_controller’ was not declared in this scope
 1089 |                         input_rotate_standard_controller(&axes);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In src/gui/wdgOverlayUi.cpp #include "input/standard_controller.h" controlled by #if defined (FULLSCREEN_RESFREQ) which produces error.

There should be no #if defined... or need additional logic to provide functionality with disabled FULLSCREEN_RESFREQ feature.

See: https://bugs.gentoo.org/927477

punesemu commented 8 months ago

Hi @winterheart, thx for the report.