RetroArch/config.h

146 lines
4.3 KiB
C
Raw Normal View History

2010-05-28 16:21:33 +00:00
/* SSNES - A Super Ninteno Entertainment System (SNES) Emulator frontend for libsnes.
* Copyright (C) 2010 - Hans-Kristian Arntzen
*
* Some code herein may be based on code found in BSNES.
*
* SSNES 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 Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* SSNES 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 SSNES.
* If not, see <http://www.gnu.org/licenses/>.
*/
2010-05-26 19:27:37 +00:00
/// Config header for SSNES
//
//
#ifndef __CONFIG_H
#define __CONFIG_H
2010-05-27 14:51:14 +00:00
#include <stdbool.h>
2010-05-26 19:27:37 +00:00
#include "libsnes.hpp"
2010-05-28 00:54:20 +00:00
#include "driver.h"
2010-05-29 13:25:49 +00:00
#include <samplerate.h>
2010-05-26 19:27:37 +00:00
2010-05-29 13:06:48 +00:00
///////////////// Drivers
2010-05-28 11:53:54 +00:00
#define VIDEO_GL 0
2010-05-29 13:06:48 +00:00
////////////////////////
2010-05-28 11:53:54 +00:00
#define AUDIO_RSOUND 1
2010-05-28 12:33:18 +00:00
#define AUDIO_OSS 2
2010-05-28 13:41:38 +00:00
#define AUDIO_ALSA 3
2010-08-16 19:20:07 +00:00
#define AUDIO_ROAR 4
2010-08-25 20:40:43 +00:00
#define AUDIO_AL 5
2010-05-29 13:06:48 +00:00
////////////////////////
2010-05-28 11:53:54 +00:00
2010-05-29 15:01:11 +00:00
// Chooses which video and audio subsystem to use. Remember to update config.mk if you change these.
2010-05-28 11:53:54 +00:00
#define VIDEO_DRIVER VIDEO_GL
2010-08-22 19:13:27 +00:00
#define AUDIO_DRIVER AUDIO_RSOUND
2010-05-28 11:53:54 +00:00
2010-05-29 13:06:48 +00:00
////////////////
// Video
////////////////
2010-05-26 19:27:37 +00:00
// Windowed
2010-05-30 18:36:58 +00:00
static const float xscale = 4.0; // Real x res = 296 * xscale
2010-05-29 14:59:57 +00:00
static const float yscale = 4.0; // Real y res = 224 * yscale
2010-05-26 19:27:37 +00:00
// Fullscreen
2010-05-30 18:41:39 +00:00
static bool fullscreen = false; // To start in Fullscreen or not
2010-08-19 14:03:53 +00:00
static const unsigned fullscreen_x = 1280;
static const unsigned fullscreen_y = 720;
2010-05-26 19:27:37 +00:00
// Video VSYNC (recommended)
static const bool vsync = true;
2010-05-29 13:06:48 +00:00
// Smooths picture
static const bool video_smooth = true;
2010-05-30 18:36:58 +00:00
// On resize and fullscreen, rendering area will stay 4:3
2010-05-29 13:06:48 +00:00
static const bool force_aspect = true;
2010-05-29 14:59:57 +00:00
/////////// Video filters
#define FILTER_NONE 0
#define FILTER_HQ2X 1
#define FILTER_HQ4X 2
2010-08-19 13:28:57 +00:00
#define FILTER_GRAYSCALE 3
2010-08-19 21:44:12 +00:00
#define FILTER_BLEED 4
2010-05-29 14:59:57 +00:00
////////////////////////
2010-08-19 13:28:57 +00:00
// If you change this to something other than FILTER_NONE, make sure that you build the filter module in config.mk.
2010-05-29 14:59:57 +00:00
#define VIDEO_FILTER FILTER_NONE
2010-05-29 13:06:48 +00:00
////////////////
2010-05-26 20:42:58 +00:00
// Audio
2010-05-29 13:06:48 +00:00
////////////////
2010-08-19 14:00:50 +00:00
// Will enable audio or not.
static const bool audio_enable = true;
2010-05-29 13:06:48 +00:00
// Output samplerate
2010-08-19 14:03:53 +00:00
static const unsigned out_rate = 48000;
2010-05-29 13:06:48 +00:00
2010-05-26 20:42:58 +00:00
// Input samplerate from libSNES.
2010-06-27 12:40:06 +00:00
// Lower this (slightly) if you are experiencing frequent audio dropouts and vsync is enabled.
2010-08-22 19:13:27 +00:00
static const unsigned in_rate = 31930;
2010-05-26 20:42:58 +00:00
2010-06-27 12:40:06 +00:00
// Audio device (e.g. hw:0,0 or /dev/audio). If NULL, will use defaults.
2010-08-22 19:13:27 +00:00
static const char* audio_device = "10.0.0.99";
2010-05-28 11:53:54 +00:00
2010-06-27 12:40:06 +00:00
// Desired audio latency in milliseconds. Might not be honored if driver can't provide given latency.
2010-08-19 21:44:12 +00:00
static const int out_latency = 64;
2010-05-28 00:45:18 +00:00
// Will sync audio. (recommended)
2010-08-19 14:00:50 +00:00
static const bool audio_sync = true;
2010-05-28 00:45:18 +00:00
2010-05-29 13:25:49 +00:00
// Defines the quality (and cpu reqirements) of samplerate conversion.
2010-08-16 17:49:54 +00:00
#define SAMPLERATE_QUALITY SRC_LINEAR
2010-05-29 13:25:49 +00:00
2010-05-29 13:06:48 +00:00
////////////////////
// Keybinds, Joypad
////////////////////
// To figure out which joypad buttons to use, check jstest or similar.
2010-05-26 19:27:37 +00:00
static const struct snes_keybind snes_keybinds[] = {
2010-05-29 13:06:48 +00:00
// SNES button | keyboard key | joypad button |
{ SNES_DEVICE_ID_JOYPAD_A, 'X', 1 },
{ SNES_DEVICE_ID_JOYPAD_B, 'Z', 0 },
{ SNES_DEVICE_ID_JOYPAD_X, 'S', 3 },
{ SNES_DEVICE_ID_JOYPAD_Y, 'A', 2 },
{ SNES_DEVICE_ID_JOYPAD_L, 'Q', 4 },
{ SNES_DEVICE_ID_JOYPAD_R, 'W', 5 },
{ SNES_DEVICE_ID_JOYPAD_LEFT, GLFW_KEY_LEFT, 12 },
{ SNES_DEVICE_ID_JOYPAD_RIGHT, GLFW_KEY_RIGHT, 13 },
{ SNES_DEVICE_ID_JOYPAD_UP, GLFW_KEY_UP, 10 },
{ SNES_DEVICE_ID_JOYPAD_DOWN, GLFW_KEY_DOWN, 11 },
{ SNES_DEVICE_ID_JOYPAD_START, GLFW_KEY_ENTER, 6 },
{ SNES_DEVICE_ID_JOYPAD_SELECT, GLFW_KEY_RSHIFT, 14 },
2010-08-16 16:40:17 +00:00
{ SNES_FAST_FORWARD_KEY, GLFW_KEY_SPACE, 9 },
2010-05-26 19:27:37 +00:00
{ -1 }
};
2010-05-29 13:06:48 +00:00
///// Save state
#define SAVE_STATE_KEY GLFW_KEY_F2
///// Load state
#define LOAD_STATE_KEY GLFW_KEY_F4
//// Toggles between fullscreen and windowed mode.
#define TOGGLE_FULLSCREEN 'F'
2010-05-26 19:27:37 +00:00
#endif