2011-08-19 23:47:33 +00:00
|
|
|
/**
|
|
|
|
** Supermodel
|
|
|
|
** A Sega Model 3 Arcade Emulator.
|
2016-03-21 04:10:14 +00:00
|
|
|
** Copyright 2011-2016 Bart Trzynadlowski, Nik Henson
|
2011-08-19 23:47:33 +00:00
|
|
|
**
|
|
|
|
** This file is part of Supermodel.
|
|
|
|
**
|
|
|
|
** Supermodel is free software: you can redistribute it and/or modify it under
|
|
|
|
** the terms of the GNU General Public License as published by the Free
|
|
|
|
** Software Foundation, either version 3 of the License, or (at your option)
|
|
|
|
** any later version.
|
|
|
|
**
|
|
|
|
** Supermodel is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
** more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License along
|
|
|
|
** with Supermodel. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* OSDConfig.h
|
|
|
|
*
|
|
|
|
* Header file defining the COSDConfig class: OSD configuration settings,
|
|
|
|
* inherited by CConfig.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INCLUDED_OSDCONFIG_H
|
|
|
|
#define INCLUDED_OSDCONFIG_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "Supermodel.h"
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* COSDConfig:
|
|
|
|
*
|
|
|
|
* Settings used by COSDConfig.
|
|
|
|
*/
|
|
|
|
class COSDConfig
|
|
|
|
{
|
|
|
|
public:
|
2016-03-21 04:10:14 +00:00
|
|
|
bool new3DEngine; // New 3D engine
|
2011-08-19 23:47:33 +00:00
|
|
|
unsigned xRes, yRes; // X and Y resolution, in pixels
|
2011-09-08 06:34:18 +00:00
|
|
|
bool fullScreen; // Full screen mode (if true)
|
2012-02-10 19:53:51 +00:00
|
|
|
bool wideScreen; // Wide screen hack
|
2012-07-15 21:04:46 +00:00
|
|
|
bool vsync; // Enable v-sync
|
2011-08-19 23:47:33 +00:00
|
|
|
bool throttle; // 60 Hz frame limiting
|
|
|
|
bool showFPS; // Show frame rate
|
2012-07-15 21:04:46 +00:00
|
|
|
unsigned crosshairs; // For game guns: 0 = no crosshairs, 1 = player 1 only, 2 = player 2 only, 3 = both players
|
2011-09-01 06:43:01 +00:00
|
|
|
bool flipStereo; // Flip stereo channels
|
2011-08-19 23:47:33 +00:00
|
|
|
|
|
|
|
#ifdef SUPERMODEL_DEBUGGER
|
|
|
|
bool disableDebugger; // disables the debugger (not stored in the config. file)
|
|
|
|
#endif
|
2011-09-18 21:44:40 +00:00
|
|
|
|
|
|
|
#ifdef SUPERMODEL_WIN32
|
2011-10-02 20:53:12 +00:00
|
|
|
unsigned dInputConstForceLeftMax;
|
|
|
|
unsigned dInputConstForceRightMax;
|
2011-09-18 21:44:40 +00:00
|
|
|
unsigned dInputSelfCenterMax;
|
|
|
|
unsigned dInputFrictionMax;
|
|
|
|
unsigned dInputVibrateMax;
|
|
|
|
unsigned xInputConstForceThreshold;
|
|
|
|
unsigned xInputConstForceMax;
|
|
|
|
unsigned xInputVibrateMax;
|
|
|
|
#endif
|
|
|
|
|
2011-08-19 23:47:33 +00:00
|
|
|
// Input system
|
|
|
|
inline void SetInputSystem(const char *inpSysName)
|
|
|
|
{
|
|
|
|
if (inpSysName == NULL)
|
|
|
|
{
|
2011-09-14 06:16:22 +00:00
|
|
|
#ifdef SUPERMODEL_WIN32 // default is DirectInput on Windows
|
|
|
|
inputSystem = "dinput";
|
|
|
|
#else // everyone else uses SDL
|
2011-08-19 23:47:33 +00:00
|
|
|
inputSystem = "sdl";
|
2011-09-14 06:16:22 +00:00
|
|
|
#endif
|
2011-08-19 23:47:33 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (stricmp(inpSysName,"sdl")
|
|
|
|
#ifdef SUPERMODEL_WIN32
|
|
|
|
&& stricmp(inpSysName,"dinput") && stricmp(inpSysName,"xinput") && stricmp(inpSysName,"rawinput")
|
|
|
|
#endif
|
|
|
|
)
|
|
|
|
{
|
2011-09-14 06:16:22 +00:00
|
|
|
#ifdef SUPERMODEL_WIN32
|
|
|
|
ErrorLog("Unknown input system '%s', defaulting to DirectInput.", inpSysName);
|
|
|
|
inputSystem = "dinput";
|
|
|
|
#else
|
2011-08-28 04:37:41 +00:00
|
|
|
ErrorLog("Unknown input system '%s', defaulting to SDL.", inpSysName);
|
2011-08-19 23:47:33 +00:00
|
|
|
inputSystem = "sdl";
|
2011-09-14 06:16:22 +00:00
|
|
|
#endif
|
2011-08-19 23:47:33 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
inputSystem = inpSysName;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const char *GetInputSystem(void)
|
|
|
|
{
|
|
|
|
return inputSystem.c_str();
|
|
|
|
}
|
2012-07-15 21:04:46 +00:00
|
|
|
|
|
|
|
// Outputs
|
|
|
|
inline void SetOutputs(const char *outputsName)
|
|
|
|
{
|
|
|
|
if (outputsName == NULL)
|
|
|
|
{
|
|
|
|
outputs = "none";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (stricmp(outputsName, "none")
|
|
|
|
#ifdef SUPERMODEL_WIN32
|
|
|
|
&& stricmp(outputsName, "win")
|
|
|
|
#endif
|
|
|
|
)
|
|
|
|
{
|
|
|
|
ErrorLog("Unknown outputs '%s', defaulting to None.", outputsName);
|
|
|
|
outputs = "none";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
outputs = outputsName;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const char *GetOutputs(void)
|
|
|
|
{
|
|
|
|
return outputs.c_str();
|
|
|
|
}
|
2011-08-19 23:47:33 +00:00
|
|
|
|
|
|
|
// Defaults
|
|
|
|
COSDConfig(void)
|
|
|
|
{
|
2016-03-21 04:10:14 +00:00
|
|
|
new3DEngine = false;
|
2011-08-19 23:47:33 +00:00
|
|
|
xRes = 496;
|
|
|
|
yRes = 384;
|
|
|
|
fullScreen = false;
|
2012-02-10 19:53:51 +00:00
|
|
|
wideScreen = false;
|
2012-07-15 21:04:46 +00:00
|
|
|
vsync = true;
|
2011-08-19 23:47:33 +00:00
|
|
|
throttle = true;
|
|
|
|
showFPS = false;
|
2012-07-15 21:04:46 +00:00
|
|
|
crosshairs = 0;
|
2011-09-01 06:43:01 +00:00
|
|
|
flipStereo = false;
|
2011-08-19 23:47:33 +00:00
|
|
|
#ifdef SUPERMODEL_DEBUGGER
|
|
|
|
disableDebugger = false;
|
|
|
|
#endif
|
2011-09-14 06:16:22 +00:00
|
|
|
#ifdef SUPERMODEL_WIN32
|
|
|
|
inputSystem = "dinput";
|
2011-10-02 20:53:12 +00:00
|
|
|
dInputConstForceLeftMax = 100;
|
|
|
|
dInputConstForceRightMax = 100;
|
2011-09-18 21:44:40 +00:00
|
|
|
dInputSelfCenterMax = 100;
|
|
|
|
dInputFrictionMax = 100;
|
|
|
|
dInputVibrateMax = 100;
|
|
|
|
xInputConstForceThreshold = 30;
|
|
|
|
xInputConstForceMax = 100;
|
|
|
|
xInputVibrateMax = 100;
|
2011-09-14 06:16:22 +00:00
|
|
|
#else
|
2011-08-19 23:47:33 +00:00
|
|
|
inputSystem = "sdl";
|
2011-09-14 06:16:22 +00:00
|
|
|
#endif
|
2012-07-15 21:04:46 +00:00
|
|
|
outputs = "none";
|
2011-08-19 23:47:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
string inputSystem;
|
2012-07-15 21:04:46 +00:00
|
|
|
string outputs;
|
2011-08-19 23:47:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // INCLUDED_OSDCONFIG_H
|