gsdx:freebsd: Fix compilation

This commit is contained in:
Jonathan Li 2016-05-01 10:43:18 +01:00
parent 57cdf0bf16
commit 571432a7aa
19 changed files with 31 additions and 29 deletions

View File

@ -365,7 +365,7 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t
int w = theApp.GetConfig("ModeWidth", 0);
int h = theApp.GetConfig("ModeHeight", 0);
#ifdef __linux__
#if defined(__unix__)
for(uint32 i = 0; i < 2; i++) {
try
{
@ -408,7 +408,7 @@ static int _GSopen(void** dsp, const char* title, GSRendererType renderer, int t
{
s_gs->SetMultithreaded(true);
#ifdef __linux__
#if defined(__unix__)
if (s_gs->m_wnd) {
// A window was already attached to s_gs so we also
// need to restore the window state (Attach)
@ -510,7 +510,7 @@ EXPORT_C_(int) GSopen2(void** dsp, uint32 flags)
}
#endif
#ifdef __linux__
#if defined(__unix__)
switch(renderer) {
// Use alternative renderer (SW if currently using HW renderer, and vice versa)
case GSRendererType::OGL_SW: renderer = GSRendererType::OGL_HW; break;
@ -882,7 +882,7 @@ EXPORT_C_(int) GSsetupRecording(int start, void* data)
printf("GSdx: no s_gs for recording\n");
return 0;
}
#ifdef __linux__
#if defined(__unix__)
if (!theApp.GetConfig("capture_enabled", 0)) {
printf("GSdx: Recording is disabled\n");
return 0;
@ -1497,7 +1497,7 @@ EXPORT_C GSBenchmark(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow
#endif
#ifdef __linux__
#if defined(__unix__)
#include "GSLzma.h"

View File

@ -382,7 +382,7 @@ GSCapture::GSCapture()
{
m_out_dir = theApp.GetConfig("capture_out_dir", "/tmp/GSdx_Capture");
m_threads = theApp.GetConfig("capture_threads", 4);
#ifdef __linux__
#if defined(__unix__)
m_compression_level = theApp.GetConfig("png_compression_level", Z_BEST_SPEED);
#endif
}
@ -481,7 +481,7 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recomendedResolution, float a
CComQIPtr<IGSSource>(m_src)->DeliverNewSegment();
#elif __linux__
#elif defined(__unix__)
// Note I think it doesn't support multiple depth creation
GSmkdir(m_out_dir.c_str());
@ -521,7 +521,7 @@ bool GSCapture::DeliverFrame(const void* bits, int pitch, bool rgba)
return true;
}
#elif __linux__
#elif defined(__unix__)
std::string out_file = m_out_dir + format("/frame.%010d.png", m_frame);
//GSPng::Save(GSPng::RGB_PNG, out_file, (uint8*)bits, m_size.x, m_size.y, pitch, m_compression_level);
@ -554,7 +554,7 @@ bool GSCapture::EndCapture()
m_graph = NULL;
}
#elif __linux__
#elif defined(__unix__)
for(size_t i = 0; i < m_workers.size(); i++) {
m_workers[i]->Wait();
}

View File

@ -42,7 +42,7 @@ class GSCapture
CComPtr<IGraphBuilder> m_graph;
CComPtr<IBaseFilter> m_src;
#elif __linux__
#elif defined(__unix__)
vector<GSPng::Worker*> m_workers;
int m_compression_level;

View File

@ -21,7 +21,7 @@
#include "stdafx.h"
#include "GSLzma.h"
#ifdef __linux__
#if defined(__unix__)
GSDumpFile::GSDumpFile(char* filename) {
m_fp = fopen(filename, "rb");

View File

@ -18,7 +18,7 @@
*
*/
#ifdef __linux__
#if defined(__unix__)
#ifdef LZMA_SUPPORTED
#include <lzma.h>

View File

@ -38,7 +38,7 @@ void GSPerfMon::Put(counter_t c, double val)
#ifndef DISABLE_PERF_MON
if(c == Frame)
{
#ifdef __linux__
#if defined(__unix__)
// clock on linux will return CLOCK_PROCESS_CPUTIME_ID.
// CLOCK_THREAD_CPUTIME_ID is much more useful to measure the fps
struct timespec ts;

View File

@ -21,7 +21,7 @@
#include "stdafx.h"
#include "GSRenderer.h"
#ifdef __linux__
#if defined(__unix__)
#include <X11/keysym.h>
#endif
@ -581,7 +581,7 @@ void GSRenderer::KeyEvent(GSKeyEventData* e)
}
}
#elif defined(__linux__)
#elif defined(__unix__)
if(e->type == KEYPRESS)
{
int step = m_shift_key ? -1 : 1;

View File

@ -21,7 +21,7 @@
#include "stdafx.h"
#include "GSSetting.h"
#ifndef __linux__
#ifdef _WIN32
#include "resource.h"
#endif

View File

@ -40,7 +40,7 @@ struct GSSetting
const char* dialog_message(int ID, bool* updateText = NULL);
#ifdef __linux__
#ifndef _WIN32
enum {
IDC_FILTER,
IDC_SKIPDRAWHACK,

View File

@ -56,7 +56,7 @@ GSState::GSState()
s_savef = !!theApp.GetConfig("savef", 0);
s_saven = theApp.GetConfig("saven", 0);
s_savel = theApp.GetConfig("savel", 5000);
#ifdef __linux__
#if defined(__unix__)
if (s_dump) {
GSmkdir("/tmp/GS_HW_dump");
GSmkdir("/tmp/GS_SW_dump");

View File

@ -65,6 +65,6 @@ public:
#endif
};
#ifdef __linux__
#if defined(__unix__)
void GSmkdir(const char* dir);
#endif

View File

@ -22,7 +22,7 @@
#include "stdafx.h"
#include "GSWndEGL.h"
#if defined(__linux__) && defined(EGL_SUPPORTED)
#if defined(__unix__) && defined(EGL_SUPPORTED)
GSWndEGL::GSWndEGL()
: m_NativeWindow(0), m_NativeDisplay(NULL)

View File

@ -21,7 +21,7 @@
#include "GSWnd.h"
#if defined(__linux__) && defined(EGL_SUPPORTED)
#if defined(__unix__) && defined(EGL_SUPPORTED)
#include <X11/Xlib.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>

View File

@ -22,7 +22,7 @@
#include "stdafx.h"
#include "GSWndOGL.h"
#if defined(__linux__)
#if defined(__unix__)
GSWndOGL::GSWndOGL()
: m_NativeWindow(0), m_NativeDisplay(NULL), m_context(0), m_swapinterval(NULL)
{

View File

@ -21,7 +21,7 @@
#include "GSWnd.h"
#if defined(__linux__)
#if defined(__unix__)
#include <X11/Xlib.h>
#include <GL/glx.h>

View File

@ -172,7 +172,7 @@ GSdxApp::GSdxApp()
m_gs_upscale_multiplier.push_back(GSSetting(5, "5x Native", ""));
m_gs_upscale_multiplier.push_back(GSSetting(6, "6x Native", ""));
m_gs_upscale_multiplier.push_back(GSSetting(8, "8x Native", ""));
#ifndef __linux__
#ifndef __unix__
m_gs_upscale_multiplier.push_back(GSSetting(0, "Custom", ""));
#endif
@ -237,7 +237,7 @@ GSdxApp::GSdxApp()
m_gpu_scale.push_back(GSSetting(2 | (2 << 2), "H x 4 - V x 4", ""));
}
#ifdef __linux__
#if defined(__unix__)
void GSdxApp::ReloadConfig()
{
if (m_configuration_map.empty()) return;

View File

@ -27,7 +27,7 @@ class GSdxApp
{
std::string m_ini;
std::string m_section;
#ifdef __linux__
#if defined(__unix__)
std::map< std::string, std::string > m_configuration_map;
#endif
@ -40,7 +40,7 @@ public:
HMODULE GetModuleHandle() {return (HMODULE)GetModuleHandlePtr();}
#endif
#ifdef __linux__
#if defined(__unix__)
void BuildConfigurationMap(const char* lpFileName);
void ReloadConfig();

View File

@ -45,7 +45,7 @@
//#define ENABLE_OGL_DEBUG_MEM_BW // compute the quantity of data transfered (debug purpose)
#endif
#if defined(__linux__) && !(defined(_DEBUG) || defined(_DEVEL))
#if defined(__unix__) && !(defined(_DEBUG) || defined(_DEVEL))
#define DISABLE_PERF_MON // Burn cycle for nothing in release mode
#endif

View File

@ -208,7 +208,9 @@ using namespace stdext;
#else
#ifndef __fastcall
#define __fastcall __attribute__((fastcall))
#endif
#define EXPORT_C_(type) extern "C" __attribute__((stdcall,externally_visible,visibility("default"))) type
#define EXPORT_C EXPORT_C_(void)