From 34af7c1281f817f283fb1ab66cbd96d9b6991640 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Thu, 17 Sep 2009 23:24:44 +0000 Subject: [PATCH] Linux: IsRunning was crashing pcsx2. Also, jNO_DEFAULT isn't a good idea in these two spots. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1845 96395faa-99c1-11dd-bbfe-3dabce05a288 --- common/src/Utilities/ThreadTools.cpp | 2 ++ pcsx2/gui/Panels/SpeedhacksPanel.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/common/src/Utilities/ThreadTools.cpp b/common/src/Utilities/ThreadTools.cpp index 934f77def7..5d79f2ac70 100644 --- a/common/src/Utilities/ThreadTools.cpp +++ b/common/src/Utilities/ThreadTools.cpp @@ -165,6 +165,8 @@ namespace Threading bool PersistentThread::IsRunning() const { + if (!m_running) return false; + if( !!m_detached ) return !!m_running; else diff --git a/pcsx2/gui/Panels/SpeedhacksPanel.cpp b/pcsx2/gui/Panels/SpeedhacksPanel.cpp index 22e8052651..3a4388a397 100644 --- a/pcsx2/gui/Panels/SpeedhacksPanel.cpp +++ b/pcsx2/gui/Panels/SpeedhacksPanel.cpp @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2009 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. @@ -47,7 +47,8 @@ const wxChar* Panels::SpeedHacksPanel::GetEEcycleSliderMsg( int val ) L"audio on many FMVs." ); - jNO_DEFAULT + default: + break; } return L"Unreachable Warning Suppressor!!"; @@ -78,8 +79,8 @@ const wxChar* Panels::SpeedHacksPanel::GetVUcycleSliderMsg( int val ) L"3 - Maximum VU Cycle Stealing. Usefulness is limited, as this will cause flickering " L"visuals or slowdown in most games." ); - - jNO_DEFAULT + default: + break; } return L"Unreachable Warning Suppressor!!"; @@ -172,7 +173,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) : L"Uses SSE's Min/Max Floating Point Operations instead of custom logical Min/Max routines. " L"Known to break Gran Tourismo 4, Tekken 5." ) ); - + m_check_vuMinMax->SetValue(opts.vuMinMax); // ------------------------------------------------------------------------