From 92f661b3904831022314bacbd759eade561ae572 Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Fri, 10 Oct 2008 16:20:13 +0000 Subject: [PATCH] Fix Linux compiling and Make Filesystemviewer show MakerID correctly git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@831 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/FilesystemViewer.cpp | 11 +++++++---- .../Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp | 6 +++++- .../Plugins/Plugin_VideoOGL/Src/Debugger/PBView.cpp | 2 +- Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp | 5 +++++ .../Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp | 9 ++++++++- Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.h | 2 +- .../Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp | 2 +- Source/Plugins/Plugin_VideoOGL/Src/SConscript | 4 ++++ 8 files changed, 32 insertions(+), 9 deletions(-) diff --git a/Source/Core/DolphinWX/Src/FilesystemViewer.cpp b/Source/Core/DolphinWX/Src/FilesystemViewer.cpp index 2a6d50e68a..e7e76c44fa 100644 --- a/Source/Core/DolphinWX/Src/FilesystemViewer.cpp +++ b/Source/Core/DolphinWX/Src/FilesystemViewer.cpp @@ -77,7 +77,10 @@ CFilesystemViewer::CFilesystemViewer(const std::string fileName, wxWindow* paren m_Country->SetValue(wxString::FromAscii("UNKNOWN")); break; } - m_MakerID->SetValue(wxString::Format(_T("0x%s"), OpenISO->GetMakerID().c_str())); + + wxString temp; + temp = _T("0x") + wxString::FromAscii(OpenISO->GetMakerID().c_str()); + m_MakerID->SetValue(temp); m_Date->SetValue(wxString(OpenISO->GetApploaderDate().c_str(), wxConvUTF8)); m_TOC->SetValue(wxString::Format(_T("%u"), OpenISO->GetFSTSize())); @@ -125,7 +128,7 @@ void CFilesystemViewer::CreateDirectoryTree(wxTreeItemId& parent, else dirName++; - wxTreeItemId item = m_Treectrl->AppendItem(parent, wxT(dirName)); + wxTreeItemId item = m_Treectrl->AppendItem(parent, wxString::FromAscii(dirName)); CreateDirectoryTree(item, begin, end, ++iterPos, name); } else { char *fileName = strrchr(name, '\\'); @@ -134,7 +137,7 @@ void CFilesystemViewer::CreateDirectoryTree(wxTreeItemId& parent, else fileName++; - m_Treectrl->AppendItem(parent, wxT(fileName)); + m_Treectrl->AppendItem(parent, wxString::FromAscii(fileName)); ++iterPos; } @@ -312,7 +315,7 @@ void CFilesystemViewer::OnExtractFile(wxCommandEvent& WXUNUSED (event)) { wxString temp; temp = m_Treectrl->GetItemText(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); - File = wxString::Format("%s\\%s", temp, File); + File = temp + _T("\\") + File; m_Treectrl->SelectItem(m_Treectrl->GetItemParent(m_Treectrl->GetSelection())); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp index 4d931b93d8..8c3a48bf1a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp @@ -19,7 +19,7 @@ // ////////////////////////////////////////////////////////////////////////////////////////// -#include "Globals.h" +#include "../Globals.h" #include "Debugger.h" #include "PBView.h" #include "IniFile.h" @@ -269,8 +269,10 @@ void CDebugger::OnShow(wxShowEvent& /*event*/) if(m_Check[2]->IsChecked()) { OpenConsole(); + #ifdef _WIN32 MoveWindow(GetConsoleHwnd(), 0,400, 1280,500, true); // move window, TODO: make this // adjustable from the debugging window + #endif } } @@ -411,8 +413,10 @@ void CDebugger::DoShowHideConsole() if(m_Check[2]->IsChecked()) { OpenConsole(); + #ifdef _WIN32 MoveWindow(GetConsoleHwnd(), 0,400, 1280,500, true); // move window, TODO: make this // adjustable from the debugging window + #endif } else { diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/PBView.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/PBView.cpp index 877e5145ff..ea09ca83d4 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/PBView.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/PBView.cpp @@ -19,7 +19,7 @@ // --------------------------------------------------------------------------------------- // includes // ----------------- -#include "Globals.h" +#include "../Globals.h" #include "PBView.h" #include diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp index 0cbe684f14..4ef01530a6 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLInit.cpp @@ -535,6 +535,7 @@ void OpenGL_Update() // We just check all of our events here XEvent event; KeySym key; + static RECT rcWindow; static bool ShiftPressed = false; static bool ControlPressed = false; static int FKeyPressed = -1; @@ -580,6 +581,10 @@ void OpenGL_Update() &GLWin.width, &GLWin.height, &borderDummy, &GLWin.depth); nBackbufferWidth = GLWin.width; nBackbufferHeight = GLWin.height; + rcWindow.left = 0; + rcWindow.top = 0; + rcWindow.right = GLWin.width; + rcWindow.bottom = GLWin.height; break; case ClientMessage: //TODO: We aren't reading this correctly, It could be anything, highest change is that it's a close event though Video_Shutdown(); // Calling from here since returning false does nothing diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp index 09f52e4158..95a4777dfe 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp @@ -23,7 +23,7 @@ #ifdef _WIN32 #include #endif -#include "Globals.h" +#include "../Globals.h" // -------------------- @@ -149,6 +149,13 @@ void ClearScreen() #endif } +void CloseConsole() +{ +} +void OpenConsole() +{ +} + #if defined(DEBUGG) && defined(_WIN32) HWND GetConsoleHwnd(void) { diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.h b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.h index 36045ddf84..ca5e23c6e7 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.h @@ -24,4 +24,4 @@ void CloseConsole(); #ifdef _WIN32 HWND GetConsoleHwnd(void); -#endif \ No newline at end of file +#endif diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp index b3da0d058b..9a4b769345 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Logging.cpp @@ -19,7 +19,7 @@ // ////////////////////////////////////////////////////////////////////////////////////////// -#include "Globals.h" // this is the precompiled header and must be the first ... +#include "../Globals.h" // this is the precompiled header and must be the first ... // --------------------------------------------------------------------------------------- // Includes diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript index ca33c729d3..809daf00f9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript +++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript @@ -24,6 +24,10 @@ files = [ 'VertexShaderManager.cpp', 'XFB.cpp', 'GUI/ConfigDlg.cpp', + 'Logging/Console.cpp', + 'Logging/Logging.cpp', + 'Debugger/Debugger.cpp', + 'Debugger/PBView.cpp', ] compileFlags = [ '-fPIC',