Linux: Fixes a few things, Should Compile in Linux. Ran Crazy Taxi horribly

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@38 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1 2008-07-21 01:27:13 +00:00
parent 36f8b9751a
commit c33cf08a2f
11 changed files with 36 additions and 14 deletions

View File

@ -105,7 +105,9 @@ typedef union _LARGE_INTEGER
#define GC_ALIGNED16_DECL(x) x #define GC_ALIGNED16_DECL(x) x
#else #else
#define GC_ALIGNED16(x) x #define GC_ALIGNED16(x) x
#define GC_ALIGNED64(x) x
#define GC_ALIGNED16_DECL(x) x __attribute((aligned(16))) #define GC_ALIGNED16_DECL(x) x __attribute((aligned(16)))
#define GC_ALIGNED64_DECL(x) x
#endif #endif
#ifndef __forceinline #ifndef __forceinline

View File

@ -1,6 +1,8 @@
#include "Common.h" #include "Common.h"
#include "FileUtil.h" #include "FileUtil.h"
#ifdef _WIN32
#include <shellapi.h> #include <shellapi.h>
#endif
bool File::Exists(const std::string &filename) bool File::Exists(const std::string &filename)
{ {

View File

@ -56,7 +56,9 @@ bool BootCore(const std::string& _rFilename)
// StartUp.bUseDualCore = false; // StartUp.bUseDualCore = false;
StartUp.bUseDynarec = true; StartUp.bUseDynarec = true;
} }
#ifndef _WIN32
StartUp.bUseDynarec = false;//Never use Dynarec in Linux, crashes
#endif
StartUp.m_BootType = SCoreStartupParameter::BOOT_ISO; StartUp.m_BootType = SCoreStartupParameter::BOOT_ISO;
StartUp.m_strFilename = _rFilename; StartUp.m_strFilename = _rFilename;
StartUp.bHLEBios = true; StartUp.bHLEBios = true;

View File

@ -191,7 +191,7 @@ CFrame::CreateMenu()
{ {
wxMenu* pGameMenu = new wxMenu; wxMenu* pGameMenu = new wxMenu;
{ {
wxMenuItem *pItem = new wxMenuItem(pGameMenu, IDM_EDITPATCHFILE, "Edit patch file"); wxMenuItem *pItem = new wxMenuItem(pGameMenu, IDM_EDITPATCHFILE, wxString::FromAscii("Edit patch file"));
pGameMenu->Append(pItem); pGameMenu->Append(pItem);
} }
} }

View File

@ -338,8 +338,8 @@ CGameListCtrl::OnRightClick(wxMouseEvent& event)
std::string unique_id = selected_iso->GetUniqueID(); std::string unique_id = selected_iso->GetUniqueID();
wxMenu popupMenu; wxMenu popupMenu;
std::string menu_text = StringFromFormat("Edit &patch file: %s.ini", unique_id.c_str()); std::string menu_text = StringFromFormat("Edit &patch file: %s.ini", unique_id.c_str());
popupMenu.Append(IDM_EDITPATCHFILE, menu_text); popupMenu.Append(IDM_EDITPATCHFILE, wxString::FromAscii(menu_text.c_str())); //Pretty much everything in wxwidgets is a wxString, try to convert to those first!
popupMenu.Append(IDM_OPENCONTAININGFOLDER, "Open &containing folder"); popupMenu.Append(IDM_OPENCONTAININGFOLDER, wxString::FromAscii("Open &containing folder"));
PopupMenu(&popupMenu); PopupMenu(&popupMenu);
} }
} }

View File

@ -17,8 +17,9 @@
#include <vector> #include <vector>
#include <string> #include <string>
#ifdef WIN32
#include "svnrev.h" #include "svnrev.h"
#endif
#include "CPUDetect.h" #include "CPUDetect.h"
#include "Globals.h" #include "Globals.h"
#include "Common.h" #include "Common.h"
@ -94,12 +95,20 @@ bool DolphinApp::OnInit()
SConfig::GetInstance().LoadSettings(); SConfig::GetInstance().LoadSettings();
wxInitAllImageHandlers(); wxInitAllImageHandlers();
// Create the main frame window // Create the main frame window
#ifdef _DEBUG #ifdef _WIN32
const char *title = "Dolphin Debug SVN R " SVN_REV_STR; #ifdef _DEBUG
const char *title = "Dolphin Debug SVN R " SVN_REV_STR;
#else
const char *title = "Dolphin SVN R " SVN_REV_STR;
#endif
#else #else
const char *title = "Dolphin SVN R " SVN_REV_STR; #ifdef _DEBUG
const char *title = "Dolphin Debug SVN Linux Build"; // Do this for now
#else
const char *title = "Dolphin SVN Linux Build";
#endif
#endif #endif
main_frame = new CFrame((wxFrame*) NULL, wxID_ANY, title, main_frame = new CFrame((wxFrame*) NULL, wxID_ANY, wxString::FromAscii(title),
wxPoint(100, 100), wxSize(800, 600)); wxPoint(100, 100), wxSize(800, 600));
// create debugger // create debugger

View File

@ -3,6 +3,7 @@ Import('env')
files = ["BPMemory.cpp", files = ["BPMemory.cpp",
"CPMemory.cpp", "CPMemory.cpp",
"LookUpTables.cpp", "LookUpTables.cpp",
"TextureDecoder.cpp",
"XFMemory.cpp", "XFMemory.cpp",
] ]

View File

@ -367,7 +367,6 @@ void DInput_Read(int _numPad, SPADStatus* _pPADStatus)
if (dinput.diks[keyForControl[CTL_START]] & 0xFF){_pPADStatus->button |= PAD_BUTTON_START;} if (dinput.diks[keyForControl[CTL_START]] & 0xFF){_pPADStatus->button |= PAD_BUTTON_START;}
} }
void XInput_Read(int _numPAD, SPADStatus* _pPADStatus) void XInput_Read(int _numPAD, SPADStatus* _pPADStatus)
{ {
#ifdef XINPUT_ENABLE #ifdef XINPUT_ENABLE

View File

@ -16,8 +16,8 @@
// http://code.google.com/p/dolphin-emu/ // http://code.google.com/p/dolphin-emu/
#include "Globals.h" #include "Globals.h"
#include "svnrev.h"
#ifdef _WIN32 #ifdef _WIN32
#include "svnrev.h"
#include "EmuWindow.h" #include "EmuWindow.h"
#endif #endif
#include "GLInit.h" #include "GLInit.h"
@ -82,10 +82,14 @@ BOOL Callback_PeekMessages()
void UpdateFPSDisplay(const char *text) void UpdateFPSDisplay(const char *text)
{ {
#ifdef _WIN32
char temp[512]; char temp[512];
sprintf(temp, "SVN R%i: %s", SVN_REV, text); sprintf(temp, "SVN R%i: %s", SVN_REV, text);
SetWindowText(EmuWindow::GetWnd(), temp); SetWindowText(EmuWindow::GetWnd(), temp);
OpenGL_SetWindowText(temp); OpenGL_SetWindowText(temp);
#else
//TODO
#endif
} }

View File

@ -13,7 +13,7 @@ files = ["BPStructs.cpp",
"PixelShaderManager.cpp", "PixelShaderManager.cpp",
"rasterfont.cpp", "rasterfont.cpp",
"Render.cpp", "Render.cpp",
"TextureDecoder.cpp", # "TextureDecoder.cpp",
"TextureMngr.cpp", "TextureMngr.cpp",
"VertexLoader.cpp", "VertexLoader.cpp",
"VertexLoader_Normal.cpp", "VertexLoader_Normal.cpp",

View File

@ -54,7 +54,10 @@ float tcScaleU[8];
float tcScaleV[8]; float tcScaleV[8];
int tcIndex; int tcIndex;
int colIndex; int colIndex;
#ifndef _WIN32
#undef inline
#define inline
#endif
inline u8 ReadBuffer8() inline u8 ReadBuffer8()
{ {
return g_pDataReader->Read8(); return g_pDataReader->Read8();