all repos — mgba @ ceac601e60d28d6524f23fb6494624ffb7b16bec

mGBA Game Boy Advance Emulator

Qt: Remove use of NaN
Jeffrey Pfau jeffrey@endrift.com
Sun, 21 Feb 2016 11:16:21 -0800
commit

ceac601e60d28d6524f23fb6494624ffb7b16bec

parent

5d9730433f9fa275f56393e33b14d768a2294fc1

3 files changed, 3 insertions(+), 7 deletions(-)

jump to
M CHANGESCHANGES

@@ -18,6 +18,7 @@ - GBA: Slightly optimize GBAProcessEvents

- Qt: Add preset for DualShock 4 - SDL: Remove default gamepad mappings - Qt: Update 360 input profile on OS X to reflect newer drivers + - Qt: Remove use of NaN 0.4.0: (2016-02-02) Features:
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -48,11 +48,6 @@ }

using namespace QGBA; -#if defined(__WIN32) || defined(__OpenBSD__) -// This is a macro everywhere except MinGW and OpenBSD, it seems -using std::isnan; -#endif - Window::Window(ConfigController* config, int playerId, QWidget* parent) : QMainWindow(parent) , m_log(0)

@@ -774,7 +769,7 @@ }

m_controller->threadContinue(); if (title.isNull()) { setWindowTitle(tr("%1 - %2").arg(projectName).arg(projectVersion)); - } else if (isnan(fps)) { + } else if (fps < 0) { setWindowTitle(tr("%1 - %2 - %3").arg(projectName).arg(title).arg(projectVersion)); } else { setWindowTitle(tr("%1 - %2 (%3 fps) - %4").arg(projectName).arg(title).arg(fps).arg(projectVersion));
M src/platform/qt/Window.hsrc/platform/qt/Window.h

@@ -142,7 +142,7 @@

QAction* addControlledAction(QMenu* menu, QAction* action, const QString& name); QAction* addHiddenAction(QMenu* menu, QAction* action, const QString& name); - void updateTitle(float fps = NAN); + void updateTitle(float fps = -1); GameController* m_controller; Display* m_display;