mark all local variables as static

This commit is contained in:
degasus 2014-07-08 15:58:25 +02:00
parent 9560ecdbec
commit 6d3f249dcc
64 changed files with 283 additions and 266 deletions

View file

@ -23,18 +23,18 @@
#define M_SQRT1_2 0.70710678118654752440
#endif
int olddelay = -1;
unsigned int oldfreq = 0;
unsigned int dlbuflen;
int cyc_pos;
float l_fwr, r_fwr, lpr_fwr, lmr_fwr;
std::vector<float> fwrbuf_l, fwrbuf_r;
float adapt_l_gain, adapt_r_gain, adapt_lpr_gain, adapt_lmr_gain;
std::vector<float> lf, rf, lr, rr, cf, cr;
float LFE_buf[256];
unsigned int lfe_pos;
float *filter_coefs_lfe;
unsigned int len125;
static int olddelay = -1;
static unsigned int oldfreq = 0;
static unsigned int dlbuflen;
static int cyc_pos;
static float l_fwr, r_fwr, lpr_fwr, lmr_fwr;
static std::vector<float> fwrbuf_l, fwrbuf_r;
static float adapt_l_gain, adapt_r_gain, adapt_lpr_gain, adapt_lmr_gain;
static std::vector<float> lf, rf, lr, rr, cf, cr;
static float LFE_buf[256];
static unsigned int lfe_pos;
static float *filter_coefs_lfe;
static unsigned int len125;
template<class T,class _ftype_t> static _ftype_t dotproduct(int count,const T *buf,const _ftype_t *coefficients)
{

View file

@ -18,9 +18,9 @@ namespace ActionReplay
{
// Alphanumeric filter for text<->bin conversion
const char *filter = "0123456789ABCDEFGHJKMNPQRTUVWXYZILOS";
static const char *filter = "0123456789ABCDEFGHJKMNPQRTUVWXYZILOS";
u32 genseeds[0x20];
static u32 genseeds[0x20];
const u8 gentable0[0x38] = {
0x39, 0x31, 0x29, 0x21, 0x19, 0x11, 0x09, 0x01,

View file

@ -66,9 +66,9 @@ namespace Core
{
// Declarations and definitions
Common::Timer Timer;
volatile u32 DrawnFrame = 0;
u32 DrawnVideo = 0;
static Common::Timer Timer;
static volatile u32 DrawnFrame = 0;
static u32 DrawnVideo = 0;
// Function forwarding
const char *Callback_ISOName(void);
@ -77,12 +77,12 @@ void Callback_WiimoteInterruptChannel(int _number, u16 _channelID, const void* _
// Function declarations
void EmuThread();
bool g_bStopping = false;
bool g_bHwInit = false;
bool g_bStarted = false;
void *g_pWindowHandle = nullptr;
std::string g_stateFileName;
std::thread g_EmuThread;
static bool g_bStopping = false;
static bool g_bHwInit = false;
static bool g_bStarted = false;
static void *g_pWindowHandle = nullptr;
static std::string g_stateFileName;
static std::thread g_EmuThread;
static StoppedCallbackFunc s_onStoppedCb = nullptr;
static std::thread g_cpu_thread;

View file

@ -17,6 +17,9 @@
#include "Common/CommonTypes.h"
#include "Core/CoreParameter.h"
// TODO: ugly, remove
extern bool g_aspect_wide;
namespace Core
{

View file

@ -27,7 +27,7 @@ struct EventType
std::string name;
};
std::vector<EventType> event_types;
static std::vector<EventType> event_types;
struct BaseEvent
{
@ -41,26 +41,26 @@ typedef LinkedListItem<BaseEvent> Event;
// STATE_TO_SAVE
static Event *first;
static std::mutex tsWriteLock;
Common::FifoQueue<BaseEvent, false> tsQueue;
static Common::FifoQueue<BaseEvent, false> tsQueue;
// event pools
Event *eventPool = nullptr;
static Event *eventPool = nullptr;
int slicelength;
int maxSliceLength = MAX_SLICE_LENGTH;
static int maxSliceLength = MAX_SLICE_LENGTH;
s64 globalTimer;
s64 idledCycles;
static s64 globalTimer;
static s64 idledCycles;
u32 fakeDecStartValue;
u64 fakeDecStartTicks;
u64 fakeTBStartValue;
u64 fakeTBStartTicks;
static u32 fakeDecStartValue;
static u64 fakeDecStartTicks;
static u64 fakeTBStartValue;
static u64 fakeTBStartTicks;
int ev_lost;
static int ev_lost;
void (*advanceCallback)(int cyclesExecuted) = nullptr;
static void (*advanceCallback)(int cyclesExecuted) = nullptr;
static Event* GetNewEvent()
{

View file

@ -38,12 +38,12 @@
SDSP g_dsp;
DSPBreakpoints dsp_breakpoints;
DSPCoreState core_state = DSPCORE_STOP;
static DSPCoreState core_state = DSPCORE_STOP;
u16 cyclesLeft = 0;
bool init_hax = false;
DSPEmitter *dspjit = nullptr;
std::unique_ptr<DSPCaptureLogger> g_dsp_cap;
Common::Event step_event;
static Common::Event step_event;
// Returns false if the hash fails and the user hits "Yes"
static bool VerifyRoms()

View file

@ -31,7 +31,7 @@
namespace DSPInterpreter {
volatile u32 gdsp_running;
static volatile u32 gdsp_running;
// NOTE: These have nothing to do with g_dsp.r.cr !

View file

@ -45,7 +45,7 @@ bool GeckoCode::Compare(GeckoCode compare) const
static bool code_handler_installed = false;
// the currently active codes
std::vector<GeckoCode> active_codes;
static std::vector<GeckoCode> active_codes;
static std::mutex active_codes_lock;
void SetActiveCodes(const std::vector<GeckoCode>& gcodes)

View file

@ -30,8 +30,8 @@
namespace HLE_Misc
{
std::string args;
u32 argsPtr;
static std::string args;
static u32 argsPtr;
// If you just want to kill a function, one of the three following are usually appropriate.
// According to the PPC ABI, the return value is always in r3.

View file

@ -147,7 +147,7 @@ static void GenerateAudioInterrupt();
static void UpdateInterrupts();
static void IncreaseSampleCount(const u32 _uAmount);
static u64 GetAIPeriod();
int et_AI;
static int et_AI;
void Init()
{

View file

@ -175,7 +175,7 @@ static ARAM_Info g_ARAM_Info;
static u16 g_AR_MODE;
static u16 g_AR_REFRESH;
DSPEmulator *dsp_emulator;
static DSPEmulator *dsp_emulator;
static int dsp_slice = 0;
static bool dsp_is_lle = false;
@ -205,7 +205,7 @@ void WriteARAM(u8 _iValue, u32 _iAddress);
bool Update_DSP_ReadRegister();
void Update_DSP_WriteRegister();
int et_GenerateDSPInterrupt;
static int et_GenerateDSPInterrupt;
static void GenerateDSPInterrupt_Wrapper(u64 userdata, int cyclesLate)
{

View file

@ -37,8 +37,8 @@ DSPLLE::DSPLLE()
m_cycle_count = 0;
}
Common::Event dspEvent;
Common::Event ppcEvent;
static Common::Event dspEvent;
static Common::Event ppcEvent;
void DSPLLE::DoState(PointerWrap &p)
{

View file

@ -20,11 +20,11 @@ namespace DSPSymbols
DSPSymbolDB g_dsp_symbol_db;
std::map<u16, int> addr_to_line;
std::map<int, u16> line_to_addr;
std::map<int, const char *> line_to_symbol;
std::vector<std::string> lines;
int line_counter = 0;
static std::map<u16, int> addr_to_line;
static std::map<int, u16> line_to_addr;
static std::map<int, const char *> line_to_symbol;
static std::vector<std::string> lines;
static int line_counter = 0;
int Addr2Line(u16 address) // -1 for not found
{

View file

@ -206,11 +206,11 @@ static u32 CurrentStart;
static u32 LoopLength;
static u32 CurrentLength;
u32 g_ErrorCode = 0;
bool g_bDiscInside = false;
static u32 g_ErrorCode = 0;
static bool g_bDiscInside = false;
bool g_bStream = false;
int tc = 0;
int dtk = 0;
static int tc = 0;
static int dtk = 0;
static u64 g_last_read_offset;
static u64 g_last_read_time;

View file

@ -21,7 +21,7 @@ namespace ExpansionInterface
static int changeDevice;
CEXIChannel *g_Channels[MAX_EXI_CHANNELS];
static CEXIChannel *g_Channels[MAX_EXI_CHANNELS];
void Init()
{
initSRAM();

View file

@ -10,7 +10,7 @@
#include "DiscIO/Volume.h"
const int NO_INDEX = -1;
const char *MC_HDR = "MC_SYSTEM_AREA";
static const char *MC_HDR = "MC_SYSTEM_AREA";
int GCMemcardDirectory::LoadGCI(std::string fileName, int region)
{
File::IOFile gcifile(fileName, "rb");

View file

@ -46,7 +46,7 @@ namespace Memory
/* Enable the Translation Lookaside Buffer functions. TLBHack = 1 in Dolphin.ini or a
<GameID>.ini file will set this to true */
bool bFakeVMEM = false;
bool bMMU = false;
static bool bMMU = false;
// ==============
@ -57,11 +57,11 @@ bool bMMU = false;
u8* base = nullptr;
// The MemArena class
MemArena g_arena;
static MemArena g_arena;
// ==============
// STATE_TO_SAVE
bool m_IsInitialized = false; // Save the Init(), Shutdown() state
static bool m_IsInitialized = false; // Save the Init(), Shutdown() state
// END STATE_TO_SAVE
// 64-bit: Pointers to low-mem (sub-0x10000000) mirror
@ -74,14 +74,14 @@ u8 *m_pFakeVMEM;
// 64-bit: Pointers to high-mem mirrors
// 32-bit: Same as above
u8 *m_pPhysicalRAM;
u8 *m_pVirtualCachedRAM;
u8 *m_pVirtualUncachedRAM;
u8 *m_pPhysicalEXRAM; // wii only
u8 *m_pVirtualCachedEXRAM; // wii only
u8 *m_pVirtualUncachedEXRAM; // wii only
static u8 *m_pPhysicalRAM;
static u8 *m_pVirtualCachedRAM;
static u8 *m_pVirtualUncachedRAM;
static u8 *m_pPhysicalEXRAM; // wii only
static u8 *m_pVirtualCachedEXRAM; // wii only
static u8 *m_pVirtualUncachedEXRAM; // wii only
//u8 *m_pVirtualEFB;
u8 *m_pVirtualL1Cache;
static u8 *m_pVirtualL1Cache;
u8 *m_pVirtualFakeVMEM;
// MMIO mapping object.

View file

@ -46,6 +46,8 @@ extern u8 *m_pRAM;
extern u8 *m_pEXRAM;
extern u8 *m_pL1Cache;
extern u8 *m_pVirtualFakeVMEM;
extern u8 *m_pFakeVMEM;
extern bool bFakeVMEM;
enum
{

View file

@ -43,10 +43,10 @@ u32 Fifo_CPUBase;
u32 Fifo_CPUEnd;
u32 Fifo_CPUWritePointer;
u32 m_Fifo_Reset;
u32 m_ResetCode;
u32 m_FlipperRev;
u32 m_Unknown;
static u32 m_Fifo_Reset;
static u32 m_ResetCode;
static u32 m_FlipperRev;
static u32 m_Unknown;
// ID and callback for scheduling reset button presses/releases

View file

@ -82,7 +82,7 @@ IPC_HLE_PERIOD: For the Wiimote this is the call schedule:
namespace SystemTimers
{
u32 CPU_CORE_CLOCK = 486000000u; // 486 mhz (its not 485, stop bugging me!)
static u32 CPU_CORE_CLOCK = 486000000u; // 486 mhz (its not 485, stop bugging me!)
/*
GameCube MHz
@ -109,19 +109,19 @@ enum
TIMER_RATIO = 12
};
int et_Dec;
int et_VI;
int et_SI;
int et_CP;
int et_AudioDMA;
int et_DSP;
int et_IPC_HLE;
int et_PatchEngine; // PatchEngine updates every 1/60th of a second by default
int et_Throttle;
static int et_Dec;
static int et_VI;
static int et_SI;
static int et_CP;
static int et_AudioDMA;
static int et_DSP;
static int et_IPC_HLE;
static int et_PatchEngine; // PatchEngine updates every 1/60th of a second by default
static int et_Throttle;
// These are badly educated guesses
// Feel free to experiment. Set these in Init below.
int
static int
// This is a fixed value, don't change it
AUDIO_DMA_PERIOD,

View file

@ -101,7 +101,7 @@ static u32 arm_irq_masks;
static u32 sensorbar_power; // do we need to care about this?
int updateInterrupts;
static int updateInterrupts;
void DoState(PointerWrap &p)
{

View file

@ -29,7 +29,7 @@ void TryToConnectWiimote(Wiimote*);
void HandleWiimoteDisconnect(int index);
void DoneWithWiimote(int index);
bool g_real_wiimotes_initialized = false;
static bool g_real_wiimotes_initialized = false;
std::recursive_mutex g_refresh_lock;

View file

@ -61,16 +61,16 @@ namespace WII_IPC_HLE_Interface
{
typedef std::map<u32, IWII_IPC_HLE_Device*> TDeviceMap;
TDeviceMap g_DeviceMap;
static TDeviceMap g_DeviceMap;
// STATE_TO_SAVE
typedef std::map<u32, std::string> TFileNameMap;
#define IPC_MAX_FDS 0x18
#define ES_MAX_COUNT 2
IWII_IPC_HLE_Device* g_FdMap[IPC_MAX_FDS];
bool es_inuse[ES_MAX_COUNT];
IWII_IPC_HLE_Device* es_handles[ES_MAX_COUNT];
static IWII_IPC_HLE_Device* g_FdMap[IPC_MAX_FDS];
static bool es_inuse[ES_MAX_COUNT];
static IWII_IPC_HLE_Device* es_handles[ES_MAX_COUNT];
typedef std::deque<u32> ipc_msg_queue;

View file

@ -35,12 +35,12 @@
// The chunk to allocate movie data in multiples of.
#define DTM_BASE_LENGTH (1024)
std::mutex cs_frameSkip;
static std::mutex cs_frameSkip;
namespace Movie {
bool g_bFrameStep = false;
bool g_bFrameStop = false;
static bool g_bFrameStop = false;
bool g_bReadOnly = true;
u32 g_rerecords = 0;
PlayMode g_playMode = MODE_NONE;
@ -48,39 +48,40 @@ PlayMode g_playMode = MODE_NONE;
u32 g_framesToSkip = 0, g_frameSkipCounter = 0;
u8 g_numPads = 0;
ControllerState g_padState;
DTMHeader tmpHeader;
u8* tmpInput = nullptr;
size_t tmpInputAllocated = 0;
static ControllerState g_padState;
static DTMHeader tmpHeader;
static u8* tmpInput = nullptr;
static size_t tmpInputAllocated = 0;
u64 g_currentByte = 0, g_totalBytes = 0;
u64 g_currentFrame = 0, g_totalFrames = 0; // VI
u64 g_currentLagCount = 0, g_totalLagCount = 0; // just stats
u64 g_currentInputCount = 0, g_totalInputCount = 0; // just stats
u64 g_totalTickCount = 0, g_tickCountAtLastInput = 0; // just stats
u64 g_recordingStartTime; // seconds since 1970 that recording started
bool bSaveConfig = false, bSkipIdle = false, bDualCore = false, bProgressive = false, bDSPHLE = false, bFastDiscSpeed = false;
bool g_bClearSave = false, bSyncGPU = false, bNetPlay = false;
std::string videoBackend = "unknown";
int iCPUCore = 1;
static u64 g_recordingStartTime; // seconds since 1970 that recording started
static bool bSaveConfig = false, bSkipIdle = false, bDualCore = false, bProgressive = false, bDSPHLE = false, bFastDiscSpeed = false;
bool g_bClearSave = false;
static bool bSyncGPU = false, bNetPlay = false;
static std::string videoBackend = "unknown";
static int iCPUCore = 1;
bool g_bDiscChange = false;
std::string g_discChange = "";
std::string author = "";
static std::string author = "";
u64 g_titleID = 0;
unsigned char MD5[16];
u8 bongos, memcards;
u8 revision[20];
u32 DSPiromHash = 0;
u32 DSPcoefHash = 0;
static unsigned char MD5[16];
static u8 bongos, memcards;
static u8 revision[20];
static u32 DSPiromHash = 0;
static u32 DSPcoefHash = 0;
bool g_bRecordingFromSaveState = false;
static bool g_bRecordingFromSaveState = false;
bool g_bPolled = false;
int g_currentSaveVersion = 0;
static int g_currentSaveVersion = 0;
std::string tmpStateFilename = File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav";
static std::string tmpStateFilename = File::GetUserPath(D_STATESAVES_IDX) + "dtm.sav";
std::string g_InputDisplay[8];
static std::string g_InputDisplay[8];
ManipFunction mfunc = nullptr;
static ManipFunction mfunc = nullptr;
static void EnsureTmpInputSize(size_t bound)
{

View file

@ -17,7 +17,7 @@
#include "Core/IPC_HLE/WII_IPC_HLE_WiiMote.h"
std::mutex crit_netplay_client;
static std::mutex crit_netplay_client;
static NetPlayClient * netplay_client = nullptr;
NetSettings g_NetPlaySettings;

View file

@ -43,8 +43,8 @@ const char *PatchTypeStrings[] =
"dword",
};
std::vector<Patch> onFrame;
std::map<u32, int> speedHacks;
static std::vector<Patch> onFrame;
static std::map<u32, int> speedHacks;
void LoadPatchSection(const std::string& section, std::vector<Patch>& patches, IniFile& globalIni, IniFile& localIni)
{

View file

@ -5,6 +5,8 @@
#pragma once
#include <string>
#include <vector>
#include "Common/IniFile.h"
namespace PatchEngine
@ -65,3 +67,4 @@ inline int GetPatchTypeCharLength(PatchType type)
}
} // namespace
extern std::vector<PatchEngine::Patch> onFrame;

View file

@ -65,7 +65,7 @@ static void patches()
}*/
}
int startTrace = 0;
static int startTrace = 0;
static void Trace(UGeckoInstruction& instCode)
{

View file

@ -221,7 +221,7 @@ namespace JitILProfiler
}
}
};
std::unique_ptr<JitILProfilerFinalizer> finalizer;
static std::unique_ptr<JitILProfilerFinalizer> finalizer;
static void Init()
{
finalizer = std::make_unique<JitILProfilerFinalizer>();

View file

@ -30,10 +30,10 @@ namespace PowerPC
// STATE_TO_SAVE
PowerPCState GC_ALIGNED16(ppcState);
volatile CPUState state = CPU_STEPPING;
static volatile CPUState state = CPU_STEPPING;
Interpreter * const interpreter = Interpreter::getInstance();
CoreMode mode;
static CoreMode mode;
BreakPoints breakpoints;
MemChecks memchecks;

View file

@ -14,10 +14,10 @@
namespace Core {
File::IOFile tracefile;
static File::IOFile tracefile;
bool bReadTrace = false;
bool bWriteTrace = false;
static bool bReadTrace = false;
static bool bWriteTrace = false;
void StartTrace(bool write)
{

View file

@ -8,7 +8,7 @@
namespace VolumeHandler
{
DiscIO::IVolume* g_pVolume = nullptr;
static DiscIO::IVolume* g_pVolume = nullptr;
DiscIO::IVolume *GetVolume()
{

View file

@ -24,15 +24,15 @@ namespace DiscScrubber
#define CLUSTER_SIZE 0x8000
u8* m_FreeTable = nullptr;
u64 m_FileSize;
u64 m_BlockCount;
u32 m_BlockSize;
int m_BlocksPerCluster;
bool m_isScrubbing = false;
static u8* m_FreeTable = nullptr;
static u64 m_FileSize;
static u64 m_BlockCount;
static u32 m_BlockSize;
static int m_BlocksPerCluster;
static bool m_isScrubbing = false;
std::string m_Filename;
IVolume* m_Disc = nullptr;
static std::string m_Filename;
static IVolume* m_Disc = nullptr;
struct SPartitionHeader
{
@ -67,7 +67,7 @@ struct SPartitionGroup
u64 PartitionsOffset;
std::vector<SPartition> PartitionsVec;
};
SPartitionGroup PartitionGroup[4];
static SPartitionGroup PartitionGroup[4];
void MarkAsUsed(u64 _Offset, u64 _Size);

View file

@ -25,11 +25,11 @@
namespace FileMon
{
DiscIO::IVolume *OpenISO = nullptr;
DiscIO::IFileSystem *pFileSystem = nullptr;
std::vector<const DiscIO::SFileInfo *> GCFiles;
std::string ISOFile = "", CurrentFile = "";
bool FileAccess = true;
static DiscIO::IVolume *OpenISO = nullptr;
static DiscIO::IFileSystem *pFileSystem = nullptr;
static std::vector<const DiscIO::SFileInfo *> GCFiles;
static std::string ISOFile = "", CurrentFile = "";
static bool FileAccess = true;
// Filtered files
bool IsSoundFile(const std::string& filename)

View file

@ -25,12 +25,11 @@
#include "Core/ActionReplay.h"
#include "Core/ARDecrypt.h"
#include "DolphinWX/ARCodeAddEdit.h"
#include "DolphinWX/ISOProperties.h"
#include "DolphinWX/WxUtils.h"
class wxWindow;
extern std::vector<ActionReplay::ARCode> arCodes;
BEGIN_EVENT_TABLE(CARCodeAddEdit, wxDialog)
EVT_BUTTON(wxID_OK, CARCodeAddEdit::SaveCheatData)
EVT_SPIN(ID_ENTRY_SELECT, CARCodeAddEdit::ChangeEntry)

View file

@ -52,7 +52,7 @@ DEFINE_EVENT_TYPE(FRAME_WRITTEN_EVENT)
using namespace std;
std::recursive_mutex sMutex;
static std::recursive_mutex sMutex;
wxEvtHandler *volatile FifoPlayerDlg::m_EvtHandler = nullptr;
FifoPlayerDlg::FifoPlayerDlg(wxWindow * const parent) :

View file

@ -119,7 +119,7 @@ extern "C" {
class InputPlugin;
class wxFrame;
bool confirmStop = false;
static bool confirmStop = false;
// Create menu items
// ---------------------

View file

@ -12,7 +12,7 @@
#include "VideoCommon/VideoConfig.h"
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = nullptr;
static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = nullptr;
// Show the current FPS
void cInterfaceGLX::UpdateFPSDisplay(const std::string& text)

View file

@ -82,7 +82,7 @@
size_t CGameListCtrl::m_currentItem = 0;
size_t CGameListCtrl::m_numberItem = 0;
std::string CGameListCtrl::m_currentFilename;
bool sorted = false;
static bool sorted = false;
extern CFrame* main_frame;
@ -657,7 +657,7 @@ const GameListItem *CGameListCtrl::GetISO(size_t index) const
return nullptr;
}
CGameListCtrl *caller;
static CGameListCtrl *caller;
static int wxCALLBACK wxListCompare(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
{
// return 1 if item1 > item2

View file

@ -87,10 +87,10 @@ struct WiiPartition
DiscIO::IFileSystem *FileSystem;
std::vector<const DiscIO::SFileInfo *> Files;
};
std::vector<WiiPartition> WiiDisc;
static std::vector<WiiPartition> WiiDisc;
DiscIO::IVolume *OpenISO = nullptr;
DiscIO::IFileSystem *pFileSystem = nullptr;
static DiscIO::IVolume *OpenISO = nullptr;
static DiscIO::IFileSystem *pFileSystem = nullptr;
std::vector<PatchEngine::Patch> onFrame;
std::vector<ActionReplay::ARCode> arCodes;

View file

@ -19,6 +19,7 @@
#include <wx/windowid.h>
#include "Common/IniFile.h"
#include "Core/ActionReplay.h"
class GameListItem;
class wxButton;
@ -32,6 +33,8 @@ class wxWindow;
namespace DiscIO { struct SFileInfo; }
namespace Gecko { class CodeConfigPanel; }
extern std::vector<ActionReplay::ARCode> arCodes;
struct PHackData
{
bool PHackSZNear;
@ -39,6 +42,7 @@ struct PHackData
std::string PHZNear;
std::string PHZFar;
};
extern PHackData PHack_Data;
class CISOProperties : public wxDialog
{

View file

@ -15,6 +15,8 @@ class wxLocale;
class wxTimer;
class wxTimerEvent;
extern CFrame* main_frame;
// Define a new application
class DolphinApp : public wxApp
{

View file

@ -26,8 +26,6 @@
class wxWindow;
extern PHackData PHack_Data;
BEGIN_EVENT_TABLE(CPHackSettings, wxDialog)
EVT_CHOICE(ID_PHACK_CHOICE, CPHackSettings::SetRefresh)
EVT_BUTTON(wxID_OK, CPHackSettings::SavePHackData)

View file

@ -29,8 +29,6 @@
class wxWindow;
extern std::vector<PatchEngine::Patch> onFrame;
BEGIN_EVENT_TABLE(CPatchAddEdit, wxDialog)
EVT_BUTTON(wxID_OK, CPatchAddEdit::SavePatchData)
EVT_BUTTON(ID_ENTRY_ADD, CPatchAddEdit::AddRemoveEntry)

View file

@ -93,60 +93,60 @@ void VideoConfigDiag::Event_Close(wxCloseEvent& ev)
}
#if defined(_WIN32)
wxString backend_desc = wxTRANSLATE("Selects what graphics API to use internally.\nThe software renderer is only used for debugging, so you'll want to use either Direct3D or OpenGL. Different games will behave differently on each backend, so for best emulation experience it's recommended to try both and chose the one that fits your requirements best.\nNote that the Direct3D backend is not available on old Windows versions.\n\nIf unsure, use OpenGL.");
static wxString backend_desc = wxTRANSLATE("Selects what graphics API to use internally.\nThe software renderer is only used for debugging, so you'll want to use either Direct3D or OpenGL. Different games will behave differently on each backend, so for best emulation experience it's recommended to try both and chose the one that fits your requirements best.\nNote that the Direct3D backend is not available on old Windows versions.\n\nIf unsure, use OpenGL.");
#else
wxString backend_desc = wxTRANSLATE("Selects what graphics API to use internally.\nThe software renderer is only used for debugging, so unless you have a reason to use it you'll want to select OpenGL here.\n\nIf unsure, use OpenGL.");
static wxString backend_desc = wxTRANSLATE("Selects what graphics API to use internally.\nThe software renderer is only used for debugging, so unless you have a reason to use it you'll want to select OpenGL here.\n\nIf unsure, use OpenGL.");
#endif
wxString adapter_desc = wxTRANSLATE("Select a hardware adapter to use.\n\nIf unsure, use the first one.");
wxString display_res_desc = wxTRANSLATE("Selects the display resolution used in fullscreen mode.\nThis should always be bigger than or equal to the internal resolution. Performance impact is negligible.\n\nIf unsure, use your desktop resolution.\nIf still unsure, use the highest resolution which works for you.");
wxString use_fullscreen_desc = wxTRANSLATE("Enable this if you want the whole screen to be used for rendering.\nIf this is disabled, a render window will be created instead.\n\nIf unsure, leave this unchecked.");
wxString auto_window_size_desc = wxTRANSLATE("Automatically adjusts the window size to your internal resolution.\n\nIf unsure, leave this unchecked.");
wxString keep_window_on_top_desc = wxTRANSLATE("Keep the game window on top of all other windows.\n\nIf unsure, leave this unchecked.");
wxString hide_mouse_cursor_desc = wxTRANSLATE("Hides the mouse cursor if it's on top of the emulation window.\n\nIf unsure, leave this checked.");
wxString render_to_main_win_desc = wxTRANSLATE("Enable this if you want to use the main Dolphin window for rendering rather than a separate render window.\n\nIf unsure, leave this unchecked.");
wxString prog_scan_desc = wxTRANSLATE("Enables progressive scan if supported by the emulated software.\nMost games don't care about this.\n\nIf unsure, leave this unchecked.");
wxString ar_desc = wxTRANSLATE("Select what aspect ratio to use when rendering:\nAuto: Use the native aspect ratio\nForce 16:9: Stretch the picture to an aspect ratio of 16:9.\nForce 4:3: Stretch the picture to an aspect ratio of 4:3.\nStretch to Window: Stretch the picture to the window size.\n\nIf unsure, select Auto.");
wxString ws_hack_desc = wxTRANSLATE("Force the game to output graphics for widescreen resolutions.\nCauses graphical glitches is some games.\n\nIf unsure, leave this unchecked.");
wxString vsync_desc = wxTRANSLATE("Wait for vertical blanks in order to reduce tearing.\nDecreases performance if emulation speed is below 100%.\n\nIf unsure, leave this unchecked.");
wxString af_desc = wxTRANSLATE("Enable anisotropic filtering.\nEnhances visual quality of textures that are at oblique viewing angles.\nMight cause issues in a small number of games.\n\nIf unsure, select 1x.");
wxString aa_desc = wxTRANSLATE("Reduces the amount of aliasing caused by rasterizing 3D graphics.\nThis makes the rendered picture look less blocky.\nHeavily decreases emulation speed and sometimes causes issues.\n\nIf unsure, select None.");
wxString scaled_efb_copy_desc = wxTRANSLATE("Greatly increases quality of textures generated using render to texture effects.\nRaising the internal resolution will improve the effect of this setting.\nSlightly decreases performance and possibly causes issues (although unlikely).\n\nIf unsure, leave this checked.");
wxString pixel_lighting_desc = wxTRANSLATE("Calculate lighting of 3D graphics per-pixel rather than per vertex.\nDecreases emulation speed by some percent (depending on your GPU).\nThis usually is a safe enhancement, but might cause issues sometimes.\n\nIf unsure, leave this unchecked.");
wxString fast_depth_calc_desc = wxTRANSLATE("Use a less accurate algorithm to calculate depth values.\nCauses issues in a few games but might give a decent speedup.\n\nIf unsure, leave this checked.");
wxString force_filtering_desc = wxTRANSLATE("Force texture filtering even if the emulated game explicitly disabled it.\nImproves texture quality slightly but causes glitches in some games.\n\nIf unsure, leave this unchecked.");
wxString _3d_vision_desc = wxTRANSLATE("Enable 3D effects via stereoscopy using Nvidia 3D Vision technology if it's supported by your GPU.\nPossibly causes issues.\nRequires fullscreen to work.\n\nIf unsure, leave this unchecked.");
wxString internal_res_desc = wxTRANSLATE("Specifies the resolution used to render at. A high resolution will improve visual quality a lot but is also quite heavy on performance and might cause glitches in certain games.\n\"Multiple of 640x528\" is a bit slower than \"Window Size\" but yields less issues. Generally speaking, the lower the internal resolution is, the better your performance will be.\n\nIf unsure, select 640x528.");
wxString efb_access_desc = wxTRANSLATE("Ignore any requests of the CPU to read from or write to the EFB.\nImproves performance in some games, but might disable some gameplay-related features or graphical effects.\n\nIf unsure, leave this unchecked.");
wxString efb_emulate_format_changes_desc = wxTRANSLATE("Ignore any changes to the EFB format.\nImproves performance in many games without any negative effect. Causes graphical defects in a small number of other games though.\n\nIf unsure, leave this checked.");
wxString efb_copy_desc = wxTRANSLATE("Disable emulation of EFB copies.\nThese are often used for post-processing or render-to-texture effects, so while checking this setting gives a great speedup it almost always also causes issues.\n\nIf unsure, leave this unchecked.");
wxString efb_copy_texture_desc = wxTRANSLATE("Store EFB copies in GPU texture objects.\nThis is not so accurate, but it works well enough for most games and gives a great speedup over EFB to RAM.\n\nIf unsure, leave this checked.");
wxString efb_copy_ram_desc = wxTRANSLATE("Accurately emulate EFB copies.\nSome games depend on this for certain graphical effects or gameplay functionality.\n\nIf unsure, check EFB to Texture instead.");
wxString stc_desc = wxTRANSLATE("The safer you adjust this, the less likely the emulator will be missing any texture updates from RAM.\n\nIf unsure, use the rightmost value.");
wxString wireframe_desc = wxTRANSLATE("Render the scene as a wireframe.\n\nIf unsure, leave this unchecked.");
wxString disable_fog_desc = wxTRANSLATE("Makes distant objects more visible by removing fog, thus increasing the overall detail.\nDisabling fog will break some games which rely on proper fog emulation.\n\nIf unsure, leave this unchecked.");
wxString disable_dstalpha_desc = wxTRANSLATE("Disables emulation of a hardware feature called destination alpha, which is used in many games for various graphical effects.\n\nIf unsure, leave this unchecked.");
wxString show_fps_desc = wxTRANSLATE("Show the number of frames rendered per second as a measure of emulation speed.\n\nIf unsure, leave this unchecked.");
wxString log_render_time_to_file_desc = wxTRANSLATE("Log the render time of every frame to User/Logs/render_time.txt. Use this feature when you want to measure the performance of Dolphin.\n\nIf unsure, leave this unchecked.");
wxString show_input_display_desc = wxTRANSLATE("Display the inputs read by the emulator.\n\nIf unsure, leave this unchecked.");
wxString show_stats_desc = wxTRANSLATE("Show various statistics.\n\nIf unsure, leave this unchecked.");
wxString texfmt_desc = wxTRANSLATE("Modify textures to show the format they're encoded in. Needs an emulation reset in most cases.\n\nIf unsure, leave this unchecked.");
wxString efb_copy_regions_desc = wxTRANSLATE("[BROKEN]\nHighlight regions the EFB was copied from.\n\nIf unsure, leave this unchecked.");
wxString xfb_desc = wxTRANSLATE("Disable any XFB emulation.\nSpeeds up emulation a lot but causes heavy glitches in many games which rely on them (especially homebrew applications).\n\nIf unsure, leave this checked.");
wxString xfb_virtual_desc = wxTRANSLATE("Emulate XFBs using GPU texture objects.\nFixes many games which don't work without XFB emulation while not being as slow as real XFB emulation. However, it may still fail for a lot of other games (especially homebrew applications).\n\nIf unsure, leave this checked.");
wxString xfb_real_desc = wxTRANSLATE("Emulate XFBs accurately.\nSlows down emulation a lot and prohibits high-resolution rendering but is necessary to emulate a number of games properly.\n\nIf unsure, check virtual XFB emulation instead.");
wxString dump_textures_desc = wxTRANSLATE("Dump decoded game textures to User/Dump/Textures/<game_id>/\n\nIf unsure, leave this unchecked.");
wxString load_hires_textures_desc = wxTRANSLATE("Load custom textures from User/Load/Textures/<game_id>/\n\nIf unsure, leave this unchecked.");
wxString dump_efb_desc = wxTRANSLATE("Dump the contents of EFB copies to User/Dump/Textures/\n\nIf unsure, leave this unchecked.");
wxString dump_frames_desc = wxTRANSLATE("Dump all rendered frames to an AVI file in User/Dump/Frames/\n\nIf unsure, leave this unchecked.");
static wxString adapter_desc = wxTRANSLATE("Select a hardware adapter to use.\n\nIf unsure, use the first one.");
static wxString display_res_desc = wxTRANSLATE("Selects the display resolution used in fullscreen mode.\nThis should always be bigger than or equal to the internal resolution. Performance impact is negligible.\n\nIf unsure, use your desktop resolution.\nIf still unsure, use the highest resolution which works for you.");
static wxString use_fullscreen_desc = wxTRANSLATE("Enable this if you want the whole screen to be used for rendering.\nIf this is disabled, a render window will be created instead.\n\nIf unsure, leave this unchecked.");
static wxString auto_window_size_desc = wxTRANSLATE("Automatically adjusts the window size to your internal resolution.\n\nIf unsure, leave this unchecked.");
static wxString keep_window_on_top_desc = wxTRANSLATE("Keep the game window on top of all other windows.\n\nIf unsure, leave this unchecked.");
static wxString hide_mouse_cursor_desc = wxTRANSLATE("Hides the mouse cursor if it's on top of the emulation window.\n\nIf unsure, leave this checked.");
static wxString render_to_main_win_desc = wxTRANSLATE("Enable this if you want to use the main Dolphin window for rendering rather than a separate render window.\n\nIf unsure, leave this unchecked.");
static wxString prog_scan_desc = wxTRANSLATE("Enables progressive scan if supported by the emulated software.\nMost games don't care about this.\n\nIf unsure, leave this unchecked.");
static wxString ar_desc = wxTRANSLATE("Select what aspect ratio to use when rendering:\nAuto: Use the native aspect ratio\nForce 16:9: Stretch the picture to an aspect ratio of 16:9.\nForce 4:3: Stretch the picture to an aspect ratio of 4:3.\nStretch to Window: Stretch the picture to the window size.\n\nIf unsure, select Auto.");
static wxString ws_hack_desc = wxTRANSLATE("Force the game to output graphics for widescreen resolutions.\nCauses graphical glitches is some games.\n\nIf unsure, leave this unchecked.");
static wxString vsync_desc = wxTRANSLATE("Wait for vertical blanks in order to reduce tearing.\nDecreases performance if emulation speed is below 100%.\n\nIf unsure, leave this unchecked.");
static wxString af_desc = wxTRANSLATE("Enable anisotropic filtering.\nEnhances visual quality of textures that are at oblique viewing angles.\nMight cause issues in a small number of games.\n\nIf unsure, select 1x.");
static wxString aa_desc = wxTRANSLATE("Reduces the amount of aliasing caused by rasterizing 3D graphics.\nThis makes the rendered picture look less blocky.\nHeavily decreases emulation speed and sometimes causes issues.\n\nIf unsure, select None.");
static wxString scaled_efb_copy_desc = wxTRANSLATE("Greatly increases quality of textures generated using render to texture effects.\nRaising the internal resolution will improve the effect of this setting.\nSlightly decreases performance and possibly causes issues (although unlikely).\n\nIf unsure, leave this checked.");
static wxString pixel_lighting_desc = wxTRANSLATE("Calculate lighting of 3D graphics per-pixel rather than per vertex.\nDecreases emulation speed by some percent (depending on your GPU).\nThis usually is a safe enhancement, but might cause issues sometimes.\n\nIf unsure, leave this unchecked.");
static wxString fast_depth_calc_desc = wxTRANSLATE("Use a less accurate algorithm to calculate depth values.\nCauses issues in a few games but might give a decent speedup.\n\nIf unsure, leave this checked.");
static wxString force_filtering_desc = wxTRANSLATE("Force texture filtering even if the emulated game explicitly disabled it.\nImproves texture quality slightly but causes glitches in some games.\n\nIf unsure, leave this unchecked.");
static wxString _3d_vision_desc = wxTRANSLATE("Enable 3D effects via stereoscopy using Nvidia 3D Vision technology if it's supported by your GPU.\nPossibly causes issues.\nRequires fullscreen to work.\n\nIf unsure, leave this unchecked.");
static wxString internal_res_desc = wxTRANSLATE("Specifies the resolution used to render at. A high resolution will improve visual quality a lot but is also quite heavy on performance and might cause glitches in certain games.\n\"Multiple of 640x528\" is a bit slower than \"Window Size\" but yields less issues. Generally speaking, the lower the internal resolution is, the better your performance will be.\n\nIf unsure, select 640x528.");
static wxString efb_access_desc = wxTRANSLATE("Ignore any requests of the CPU to read from or write to the EFB.\nImproves performance in some games, but might disable some gameplay-related features or graphical effects.\n\nIf unsure, leave this unchecked.");
static wxString efb_emulate_format_changes_desc = wxTRANSLATE("Ignore any changes to the EFB format.\nImproves performance in many games without any negative effect. Causes graphical defects in a small number of other games though.\n\nIf unsure, leave this checked.");
static wxString efb_copy_desc = wxTRANSLATE("Disable emulation of EFB copies.\nThese are often used for post-processing or render-to-texture effects, so while checking this setting gives a great speedup it almost always also causes issues.\n\nIf unsure, leave this unchecked.");
static wxString efb_copy_texture_desc = wxTRANSLATE("Store EFB copies in GPU texture objects.\nThis is not so accurate, but it works well enough for most games and gives a great speedup over EFB to RAM.\n\nIf unsure, leave this checked.");
static wxString efb_copy_ram_desc = wxTRANSLATE("Accurately emulate EFB copies.\nSome games depend on this for certain graphical effects or gameplay functionality.\n\nIf unsure, check EFB to Texture instead.");
static wxString stc_desc = wxTRANSLATE("The safer you adjust this, the less likely the emulator will be missing any texture updates from RAM.\n\nIf unsure, use the rightmost value.");
static wxString wireframe_desc = wxTRANSLATE("Render the scene as a wireframe.\n\nIf unsure, leave this unchecked.");
static wxString disable_fog_desc = wxTRANSLATE("Makes distant objects more visible by removing fog, thus increasing the overall detail.\nDisabling fog will break some games which rely on proper fog emulation.\n\nIf unsure, leave this unchecked.");
static wxString disable_dstalpha_desc = wxTRANSLATE("Disables emulation of a hardware feature called destination alpha, which is used in many games for various graphical effects.\n\nIf unsure, leave this unchecked.");
static wxString show_fps_desc = wxTRANSLATE("Show the number of frames rendered per second as a measure of emulation speed.\n\nIf unsure, leave this unchecked.");
static wxString log_render_time_to_file_desc = wxTRANSLATE("Log the render time of every frame to User/Logs/render_time.txt. Use this feature when you want to measure the performance of Dolphin.\n\nIf unsure, leave this unchecked.");
static wxString show_input_display_desc = wxTRANSLATE("Display the inputs read by the emulator.\n\nIf unsure, leave this unchecked.");
static wxString show_stats_desc = wxTRANSLATE("Show various statistics.\n\nIf unsure, leave this unchecked.");
static wxString texfmt_desc = wxTRANSLATE("Modify textures to show the format they're encoded in. Needs an emulation reset in most cases.\n\nIf unsure, leave this unchecked.");
static wxString efb_copy_regions_desc = wxTRANSLATE("[BROKEN]\nHighlight regions the EFB was copied from.\n\nIf unsure, leave this unchecked.");
static wxString xfb_desc = wxTRANSLATE("Disable any XFB emulation.\nSpeeds up emulation a lot but causes heavy glitches in many games which rely on them (especially homebrew applications).\n\nIf unsure, leave this checked.");
static wxString xfb_virtual_desc = wxTRANSLATE("Emulate XFBs using GPU texture objects.\nFixes many games which don't work without XFB emulation while not being as slow as real XFB emulation. However, it may still fail for a lot of other games (especially homebrew applications).\n\nIf unsure, leave this checked.");
static wxString xfb_real_desc = wxTRANSLATE("Emulate XFBs accurately.\nSlows down emulation a lot and prohibits high-resolution rendering but is necessary to emulate a number of games properly.\n\nIf unsure, check virtual XFB emulation instead.");
static wxString dump_textures_desc = wxTRANSLATE("Dump decoded game textures to User/Dump/Textures/<game_id>/\n\nIf unsure, leave this unchecked.");
static wxString load_hires_textures_desc = wxTRANSLATE("Load custom textures from User/Load/Textures/<game_id>/\n\nIf unsure, leave this unchecked.");
static wxString dump_efb_desc = wxTRANSLATE("Dump the contents of EFB copies to User/Dump/Textures/\n\nIf unsure, leave this unchecked.");
static wxString dump_frames_desc = wxTRANSLATE("Dump all rendered frames to an AVI file in User/Dump/Frames/\n\nIf unsure, leave this unchecked.");
#if !defined WIN32 && defined HAVE_LIBAV
wxString use_ffv1_desc = wxTRANSLATE("Encode frame dumps using the FFV1 codec.\n\nIf unsure, leave this unchecked.");
static wxString use_ffv1_desc = wxTRANSLATE("Encode frame dumps using the FFV1 codec.\n\nIf unsure, leave this unchecked.");
#endif
wxString free_look_desc = wxTRANSLATE("This feature allows you to change the game's camera.\nMove the mouse while holding the right mouse button to pan and while holding the middle button to move.\nHold SHIFT and press one of the WASD keys to move the camera by a certain step distance (SHIFT+0 to move faster and SHIFT+9 to move slower). Press SHIFT+R to reset the camera.\n\nIf unsure, leave this unchecked.");
wxString crop_desc = wxTRANSLATE("Crop the picture from 4:3 to 5:4 or from 16:9 to 16:10.\n\nIf unsure, leave this unchecked.");
wxString omp_desc = wxTRANSLATE("Use multiple threads to decode textures.\nMight result in a speedup (especially on CPUs with more than two cores).\n\nIf unsure, leave this unchecked.");
wxString ppshader_desc = wxTRANSLATE("Apply a post-processing effect after finishing a frame.\n\nIf unsure, select (off).");
wxString cache_efb_copies_desc = wxTRANSLATE("Slightly speeds up EFB to RAM copies by sacrificing emulation accuracy.\nSometimes also increases visual quality.\nIf you're experiencing any issues, try raising texture cache accuracy or disable this option.\n\nIf unsure, leave this unchecked.");
wxString shader_errors_desc = wxTRANSLATE("Usually if shader compilation fails, an error message is displayed.\nHowever, one may skip the popups to allow interruption free gameplay by checking this option.\n\nIf unsure, leave this unchecked.");
static wxString free_look_desc = wxTRANSLATE("This feature allows you to change the game's camera.\nMove the mouse while holding the right mouse button to pan and while holding the middle button to move.\nHold SHIFT and press one of the WASD keys to move the camera by a certain step distance (SHIFT+0 to move faster and SHIFT+9 to move slower). Press SHIFT+R to reset the camera.\n\nIf unsure, leave this unchecked.");
static wxString crop_desc = wxTRANSLATE("Crop the picture from 4:3 to 5:4 or from 16:9 to 16:10.\n\nIf unsure, leave this unchecked.");
static wxString omp_desc = wxTRANSLATE("Use multiple threads to decode textures.\nMight result in a speedup (especially on CPUs with more than two cores).\n\nIf unsure, leave this unchecked.");
static wxString ppshader_desc = wxTRANSLATE("Apply a post-processing effect after finishing a frame.\n\nIf unsure, select (off).");
static wxString cache_efb_copies_desc = wxTRANSLATE("Slightly speeds up EFB to RAM copies by sacrificing emulation accuracy.\nSometimes also increases visual quality.\nIf you're experiencing any issues, try raising texture cache accuracy or disable this option.\n\nIf unsure, leave this unchecked.");
static wxString shader_errors_desc = wxTRANSLATE("Usually if shader compilation fails, an error message is displayed.\nHowever, one may skip the popups to allow interruption free gameplay by checking this option.\n\nIf unsure, leave this unchecked.");
// Search for available resolutions - TODO: Move to Common?

View file

@ -1574,10 +1574,10 @@ const GLFunc gl_function_array[] =
namespace GLExtensions
{
// Private members and functions
bool _isES3;
bool _isES;
u32 _GLVersion;
std::unordered_map<std::string, bool> m_extension_list;
static bool _isES3;
static bool _isES;
static u32 _GLVersion;
static std::unordered_map<std::string, bool> m_extension_list;
// Private initialization functions
bool InitFunctionPointers();

View file

@ -29,7 +29,7 @@ s32 ProgramShaderCache::s_ubo_align;
static StreamBuffer *s_buffer;
static int num_failures = 0;
LinearDiskCache<SHADERUID, u8> g_program_disk_cache;
static LinearDiskCache<SHADERUID, u8> g_program_disk_cache;
static GLuint CurrentProgram = 0;
ProgramShaderCache::PCache ProgramShaderCache::pshaders;
ProgramShaderCache::PCacheEntry* ProgramShaderCache::last_entry;

View file

@ -67,7 +67,7 @@ void VideoConfig::UpdateProjectionHack()
::UpdateProjectionHack(g_Config.iPhackvalue, g_Config.sPhackvalue);
}
int OSDInternalW, OSDInternalH;
static int OSDInternalW, OSDInternalH;
namespace OGL
{

View file

@ -47,10 +47,10 @@ namespace Clipper
{
enum { NUM_CLIPPED_VERTICES = 33, NUM_INDICES = NUM_CLIPPED_VERTICES + 3 };
float m_ViewOffset[2];
static float m_ViewOffset[2];
OutputVertexData ClippedVertices[NUM_CLIPPED_VERTICES];
OutputVertexData *Vertices[NUM_INDICES];
static OutputVertexData ClippedVertices[NUM_CLIPPED_VERTICES];
static OutputVertexData *Vertices[NUM_INDICES];
void DoState(PointerWrap &p)
{

View file

@ -14,7 +14,7 @@
#include "VideoCommon/PixelEngine.h"
u8 efb[EFB_WIDTH*EFB_HEIGHT*6];
static u8 efb[EFB_WIDTH*EFB_HEIGHT*6];
namespace EfbInterface
{

View file

@ -16,11 +16,11 @@
namespace HwRasterizer
{
float efbHalfWidth;
float efbHalfHeight;
bool hasTexture;
static float efbHalfWidth;
static float efbHalfHeight;
static bool hasTexture;
u8 *temp;
static u8 *temp;
// Programs
static GLuint colProg, texProg, clearProg;

View file

@ -32,23 +32,23 @@ static inline s32 FixedLog2(float f)
namespace Rasterizer
{
Slope ZSlope;
Slope WSlope;
Slope ColorSlopes[2][4];
Slope TexSlopes[8][3];
static Slope ZSlope;
static Slope WSlope;
static Slope ColorSlopes[2][4];
static Slope TexSlopes[8][3];
s32 vertex0X;
s32 vertex0Y;
float vertexOffsetX;
float vertexOffsetY;
static s32 vertex0X;
static s32 vertex0Y;
static float vertexOffsetX;
static float vertexOffsetY;
s32 scissorLeft = 0;
s32 scissorTop = 0;
s32 scissorRight = 0;
s32 scissorBottom = 0;
static s32 scissorLeft = 0;
static s32 scissorTop = 0;
static s32 scissorRight = 0;
static s32 scissorBottom = 0;
Tev tev;
RasterBlock rasterBlock;
static Tev tev;
static RasterBlock rasterBlock;
void DoState(PointerWrap &p)
{

View file

@ -33,14 +33,14 @@ enum
// STATE_TO_SAVE
// variables
const int commandBufferSize = 1024 * 1024;
const int maxCommandBufferWrite = commandBufferSize - GATHER_PIPE_SIZE;
u8 commandBuffer[commandBufferSize];
u32 readPos;
u32 writePos;
int et_UpdateInterrupts;
volatile bool interruptSet;
volatile bool interruptWaiting;
static const int commandBufferSize = 1024 * 1024;
static const int maxCommandBufferWrite = commandBufferSize - GATHER_PIPE_SIZE;
static u8 commandBuffer[commandBufferSize];
static u32 readPos;
static u32 writePos;
static int et_UpdateInterrupts;
static volatile bool interruptSet;
static volatile bool interruptWaiting;
CPReg cpreg; // shared between gfx and emulator thread

View file

@ -32,7 +32,7 @@ static std::string s_sScreenshotName;
// Rasterfont isn't compatible with GLES
// degasus: I think it does, but I can't test it
RasterFont* s_pfont = nullptr;
static RasterFont* s_pfont = nullptr;
void SWRenderer::Init()
{

View file

@ -24,21 +24,21 @@
namespace CommandProcessor
{
int et_UpdateInterrupts;
static int et_UpdateInterrupts;
// TODO(ector): Warn on bbox read/write
// STATE_TO_SAVE
SCPFifoStruct fifo;
UCPStatusReg m_CPStatusReg;
UCPCtrlReg m_CPCtrlReg;
UCPClearReg m_CPClearReg;
static UCPStatusReg m_CPStatusReg;
static UCPCtrlReg m_CPCtrlReg;
static UCPClearReg m_CPClearReg;
u16 m_bboxleft;
u16 m_bboxtop;
u16 m_bboxright;
u16 m_bboxbottom;
u16 m_tokenReg;
static u16 m_bboxleft;
static u16 m_bboxtop;
static u16 m_bboxright;
static u16 m_bboxbottom;
static u16 m_tokenReg;
volatile bool isPossibleWaitingSetDrawDone = false;
volatile bool interruptSet= false;

View file

@ -32,14 +32,14 @@ namespace DriverDetails
const u32 m_os = OS_ALL | OS_LINUX;
#endif
Vendor m_vendor = VENDOR_UNKNOWN;
Driver m_driver = DRIVER_UNKNOWN;
s32 m_family = 0;
double m_version = 0.0;
static Vendor m_vendor = VENDOR_UNKNOWN;
static Driver m_driver = DRIVER_UNKNOWN;
static s32 m_family = 0;
static double m_version = 0.0;
// This is a list of all known bugs for each vendor
// We use this to check if the device and driver has a issue
BugInfo m_known_bugs[] = {
static BugInfo m_known_bugs[] = {
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_NODYNUBOACCESS, 14.0, -1.0, true},
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENCENTROID, 14.0, 46.0, true},
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENINFOLOG, -1.0, 46.0, true},
@ -59,7 +59,7 @@ namespace DriverDetails
{OS_LINUX, VENDOR_NVIDIA, DRIVER_NVIDIA, -1, BUG_BROKENUNSYNCMAPPING, -1.0, -1.0, true},
};
std::map<Bug, BugInfo> m_bugs;
static std::map<Bug, BugInfo> m_bugs;
void Init(Vendor vendor, Driver driver, const double version, const s32 family)
{

View file

@ -18,7 +18,7 @@
namespace HiresTextures
{
std::map<std::string, std::string> textureMap;
static std::map<std::string, std::string> textureMap;
void Init(const std::string& gameCode)
{

View file

@ -22,8 +22,8 @@ volatile u32 s_swapRequested = false;
u32 s_efbAccessRequested = false;
volatile u32 s_FifoShuttingDown = false;
std::condition_variable s_perf_query_cond;
std::mutex s_perf_query_lock;
static std::condition_variable s_perf_query_cond;
static std::mutex s_perf_query_lock;
static volatile bool s_perf_query_requested;
static volatile struct

View file

@ -97,14 +97,14 @@ static UPEAlphaReadReg m_AlphaRead;
static UPECtrlReg m_Control;
//static u16 m_Token; // token value most recently encountered
volatile u32 g_bSignalTokenInterrupt;
volatile u32 g_bSignalFinishInterrupt;
static volatile u32 g_bSignalTokenInterrupt;
static volatile u32 g_bSignalFinishInterrupt;
static int et_SetTokenOnMainThread;
static int et_SetFinishOnMainThread;
volatile u32 interruptSetToken = 0;
volatile u32 interruptSetFinish = 0;
static volatile u32 interruptSetToken = 0;
static volatile u32 interruptSetFinish = 0;
u16 bbox[4];
bool bbox_active;

View file

@ -40,7 +40,8 @@
// TODO: Move these out of here.
int frameCount;
int OSDChoice, OSDTime;
int OSDChoice;
static int OSDTime;
Renderer *g_renderer = nullptr;
@ -350,9 +351,6 @@ void Renderer::DrawDebugText()
g_renderer->RenderText(final_yellow, 20, 20, 0xFFFFFF00);
}
// TODO: remove
extern bool g_aspect_wide;
void Renderer::UpdateDrawRectangle(int backbuffer_width, int backbuffer_height)
{
float FloatGLWidth = (float)backbuffer_width;

View file

@ -36,7 +36,7 @@ TextureCache::TexCache TextureCache::textures;
TextureCache::BackupConfig TextureCache::backup_config;
bool invalidate_texture_cache_requested;
static bool invalidate_texture_cache_requested;
TextureCache::TCacheEntryBase::~TCacheEntryBase()
{

View file

@ -32,8 +32,8 @@
#pragma clang diagnostic ignored "-Wshadow"
#endif
bool TexFmt_Overlay_Enable=false;
bool TexFmt_Overlay_Center=false;
static bool TexFmt_Overlay_Enable=false;
static bool TexFmt_Overlay_Center=false;
extern const char* texfmt[];
extern const unsigned char sfont_map[];

View file

@ -23,6 +23,15 @@
#endif
#endif
// They are used for the communication with the loader functions
extern NativeVertexFormat *g_nativeVertexFmt;
extern int tcIndex;
extern int colIndex;
extern TVtxAttr* pVtxAttr;
extern int colElements[2];
extern float posScale;
extern float tcScale[8];
class VertexLoaderUID
{
u32 vid[5];

View file

@ -18,7 +18,7 @@
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
float GC_ALIGNED16(g_fProjectionMatrix[16]);
static float GC_ALIGNED16(g_fProjectionMatrix[16]);
// track changes
static bool bTexMatricesChanged[2], bPosNormalMatrixChanged, bProjectionChanged, bViewportChanged;