Skip to content

Commit

Permalink
pcsx2:freebsd: Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
turtleli committed May 20, 2016
1 parent 5f6658a commit e10ed74
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pcsx2/AsyncFileReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# undef Yield
#elif defined(__linux__)
# include <libaio.h>
#elif defined(__APPLE__)
#elif defined(__POSIX__)
# include <aio.h>
#endif
#include <memory>
Expand Down
12 changes: 12 additions & 0 deletions pcsx2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,12 @@ set(pcsx2OSXSources
Darwin/DarwinFlatFileReader.cpp
)

set(pcsx2FreeBSDSources
Linux/LnxConsolePipe.cpp
Linux/LnxKeyCodes.cpp
Darwin/DarwinFlatFileReader.cpp
)

# Linux headers
set(pcsx2LinuxHeaders
)
Expand Down Expand Up @@ -615,6 +621,12 @@ if(APPLE)
${pcsx2LinuxHeaders})
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(Platform
${pcsx2FreeBSDSources}
${pcsx2LinuxHeaders})
endif()

set(pcsx2FinalSources
${Common}
${Platform}
Expand Down
7 changes: 4 additions & 3 deletions pcsx2/IPU/yuv2rgb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ void yuv2rgb_reference(void)
}
}

#if defined(_M_X86_32)
// TODO OSX optimize me
#ifdef __APPLE__
#if defined(__clang__) && !defined(__linux__)
void yuv2rgb_sse2() {
yuv2rgb_reference();
}

#elif defined(_M_X86_32)
#else
// Everything below is bit accurate to the IPU specification (except maybe rounding).
// Know the specification before you touch it.
#define SSE_BYTES(x) {x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x}
Expand Down Expand Up @@ -411,3 +411,4 @@ __ri void yuv2rgb_sse2(void)
#endif
}
#endif
#endif
8 changes: 1 addition & 7 deletions pcsx2/PrecompiledHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,7 @@ typedef FnType_Void* Fnptr_Void;

#else // must be GCC or Clang

# include <sys/types.h>
# include <sys/timeb.h>

// Definitions added Feb 16, 2006 by efp
# ifndef __declspec
# define __declspec(x)
# endif
#include <sys/types.h>

#endif

Expand Down
6 changes: 3 additions & 3 deletions pcsx2/gui/ConsoleLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1017,11 +1017,11 @@ void Pcsx2App::ProgramLog_PostEvent( wxEvent& evt )

static void __concall ConsoleToFile_Newline()
{
#ifdef __linux__
#if defined(__unix__)
if ((g_Conf) && (g_Conf->EmuOptions.ConsoleToStdio)) ConsoleWriter_Stdout.Newline();
#endif

#ifdef __linux__
#if defined(__unix__)
fputc( '\n', emuLog );
#else
fputs( "\r\n", emuLog );
Expand All @@ -1030,7 +1030,7 @@ static void __concall ConsoleToFile_Newline()

static void __concall ConsoleToFile_DoWrite( const wxString& fmt )
{
#ifdef __linux__
#if defined(__unix__)
if ((g_Conf) && (g_Conf->EmuOptions.ConsoleToStdio)) ConsoleWriter_Stdout.WriteRaw(fmt);
#endif

Expand Down
8 changes: 4 additions & 4 deletions pcsx2/gui/FrameForGS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void GSPanel::OnMouseEvent( wxMouseEvent& evt )
DoShowMouse();
}

#ifdef __linux__
#if defined(__unix__)
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
// the event before the pad see it. So you send key event directly to the pad.
if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) {
Expand Down Expand Up @@ -285,7 +285,7 @@ void GSPanel::OnKeyDownOrUp( wxKeyEvent& evt )
// to the APP level message handler, which in turn routes them right back here -- yes it's
// silly, but oh well).

#ifdef __linux__
#if defined(__unix__)
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
// the event before the pad see it. So you send key event directly to the pad.
if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) {
Expand Down Expand Up @@ -367,7 +367,7 @@ void GSPanel::OnFocus( wxFocusEvent& evt )
else
DoShowMouse();

#ifdef __linux__
#if defined(__unix__)
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
// the event before the pad see it. So you send key event directly to the pad.
if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) {
Expand All @@ -385,7 +385,7 @@ void GSPanel::OnFocusLost( wxFocusEvent& evt )
evt.Skip();
m_HasFocus = false;
DoShowMouse();
#ifdef __linux__
#if defined(__unix__)
// HACK2: In gsopen2 there is one event buffer read by both wx/gui and pad plugin. Wx deletes
// the event before the pad see it. So you send key event directly to the pad.
if( (PADWriteEvent != NULL) && (GSopen2 != NULL) ) {
Expand Down
4 changes: 2 additions & 2 deletions pcsx2/gui/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title)
// ------------------------------------------------------------------------

m_menuMisc.Append( &m_MenuItem_Console );
#ifdef __linux__
#if defined(__unix__)
m_menuMisc.Append( &m_MenuItem_Console_Stdio );
#endif
//Todo: Though not many people need this one :p
Expand Down Expand Up @@ -695,7 +695,7 @@ void MainEmuFrame::ApplyConfigToGui(AppConfig& configToApply, int flags)
menubar.Check( MenuId_EnableCheats, configToApply.EmuOptions.EnableCheats );
menubar.Check( MenuId_EnableWideScreenPatches, configToApply.EmuOptions.EnableWideScreenPatches );
menubar.Check( MenuId_EnableHostFs, configToApply.EmuOptions.HostFs );
#ifdef __linux__
#if defined(__unix__)
menubar.Check( MenuId_Console_Stdio, configToApply.EmuOptions.ConsoleToStdio );
#endif

Expand Down
2 changes: 1 addition & 1 deletion pcsx2/gui/i18n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ void i18n_SetLanguagePath()
// default location for windows
wxLocale::AddCatalogLookupPathPrefix( wxGetCwd() );
// additional location for linux
#ifdef __linux__
#ifdef __unix__
wxLocale::AddCatalogLookupPathPrefix( PathDefs::GetLangs().ToString() );
#endif

Expand Down

0 comments on commit e10ed74

Please sign in to comment.