Drop video_force_16bit.

This option is silly now.
This commit is contained in:
Themaister 2012-11-20 23:23:18 +01:00
parent ce47241697
commit 28bb46483c
17 changed files with 20 additions and 50 deletions

View File

@ -168,9 +168,6 @@ static const unsigned monitor_index = 0; // Which monitor to prefer. 0 is any mo
static const unsigned fullscreen_x = 0; // Fullscreen resolution. A value of 0 uses the desktop resolution.
static const unsigned fullscreen_y = 0;
// Force 16-bit colors.
static const bool force_16bit = false;
// Forcibly disable composition. Only valid on Windows Vista/7 for now.
static const bool disable_composition = false;

View File

@ -125,7 +125,6 @@ struct settings
float msg_color_g;
float msg_color_b;
bool force_16bit;
bool disable_composition;
bool hires_record;

View File

@ -250,11 +250,10 @@ static void gfx_ctx_update_window_title(bool reset)
static bool gfx_ctx_set_video_mode(
unsigned width, unsigned height,
unsigned bits, bool fullscreen)
bool fullscreen)
{
(void)width;
(void)height;
(void)bits;
(void)fullscreen;
return true;
}

View File

@ -395,9 +395,8 @@ static struct drm_fb *drm_fb_get_from_bo(struct gbm_bo *bo)
static bool gfx_ctx_set_video_mode(
unsigned width, unsigned height,
unsigned bits, bool fullscreen)
bool fullscreen)
{
(void)bits;
if (g_inited)
return false;

View File

@ -227,10 +227,8 @@ error:
static bool gfx_ctx_set_video_mode(
unsigned width, unsigned height,
unsigned bits, bool fullscreen)
bool fullscreen)
{
(void)bits;
struct sigaction sa = {{0}};
sa.sa_handler = sighandler;
sa.sa_flags = SA_RESTART;

View File

@ -460,7 +460,7 @@ static bool gfx_ctx_init(void)
static bool gfx_ctx_set_video_mode(
unsigned width, unsigned height,
unsigned bits, bool fullscreen)
bool fullscreen)
{
return true;
}

View File

@ -151,7 +151,7 @@ static void sdl_set_handles(void)
static bool gfx_ctx_set_video_mode(
unsigned width, unsigned height,
unsigned bits, bool fullscreen)
bool fullscreen)
{
#ifndef __APPLE__ // Resizing on OSX is broken in 1.2 it seems :)
static const int resizable = SDL_RESIZABLE;
@ -162,7 +162,7 @@ static bool gfx_ctx_set_video_mode(
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, g_interval);
if (!SDL_SetVideoMode(width, height, bits,
if (!SDL_SetVideoMode(width, height, 0,
SDL_OPENGL | (fullscreen ? SDL_FULLSCREEN : resizable)))
{
RARCH_ERR("Failed to create SDL window.\n");

View File

@ -231,9 +231,8 @@ error:
static bool gfx_ctx_set_video_mode(
unsigned width, unsigned height,
unsigned bits, bool fullscreen)
bool fullscreen)
{
(void)bits;
if (g_inited)
return false;

View File

@ -275,10 +275,8 @@ static void monitor_info(MONITORINFOEX *mon, HMONITOR *hm_to_use)
static bool gfx_ctx_set_video_mode(
unsigned width, unsigned height,
unsigned bits, bool fullscreen)
bool fullscreen)
{
(void)bits;
DWORD style;
HMONITOR hm_to_use = NULL;

View File

@ -247,10 +247,8 @@ error:
static bool gfx_ctx_set_video_mode(
unsigned width, unsigned height,
unsigned bits, bool fullscreen)
bool fullscreen)
{
(void)bits;
struct sigaction sa = {{0}};
sa.sa_handler = sighandler;
sa.sa_flags = SA_RESTART;

View File

@ -59,7 +59,7 @@ typedef struct gfx_ctx_driver
void (*swap_interval)(unsigned);
// Sets video mode. Creates a window, etc.
bool (*set_video_mode)(unsigned, unsigned, unsigned, bool);
bool (*set_video_mode)(unsigned, unsigned, bool);
// Gets current window size.
// If not initialized yet, it returns current screen size.

View File

@ -1341,8 +1341,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
win_height = gl->full_y;
}
if (!context_set_video_mode_func(win_width, win_height,
g_settings.video.force_16bit ? 15 : 0, video->fullscreen))
if (!context_set_video_mode_func(win_width, win_height, video->fullscreen))
{
free(gl);
return NULL;

View File

@ -70,7 +70,7 @@
#define context_has_focus_func() gl->ctx_driver->has_focus()
#define context_check_window_func(quit, resize, width, height, frame_count) gl->ctx_driver->check_window(quit, resize, width, height, frame_count)
#define context_update_window_title_func(var) gl->ctx_driver->update_window_title(var)
#define context_set_video_mode_func(width, height, force_16bit, fullscreen) gl->ctx_driver->set_video_mode(width, height, force_16bit, fullscreen)
#define context_set_video_mode_func(width, height, fullscreen) gl->ctx_driver->set_video_mode(width, height, fullscreen)
#define context_input_driver_func(input, input_data) gl->ctx_driver->input_driver(input, input_data)
#ifdef HAVE_RMENU

View File

@ -352,8 +352,9 @@ static void *sdl_gfx_init(const video_info_t *video, const input_driver_t **inpu
if (!video->fullscreen)
RARCH_LOG("Creating window @ %ux%u\n", video->width, video->height);
vid->render32 = !g_settings.video.force_16bit;
vid->screen = SDL_SetVideoMode(video->width, video->height, vid->render32 ? 32 : 16, SDL_HWSURFACE | SDL_HWACCEL | SDL_DOUBLEBUF | (video->fullscreen ? SDL_FULLSCREEN : 0));
vid->render32 = true;
vid->screen = SDL_SetVideoMode(video->width, video->height, 32,
SDL_HWSURFACE | SDL_HWACCEL | SDL_DOUBLEBUF | (video->fullscreen ? SDL_FULLSCREEN : 0));
if (!vid->screen)
{
@ -361,27 +362,16 @@ static void *sdl_gfx_init(const video_info_t *video, const input_driver_t **inpu
goto error;
}
if (!video->rgb32 && vid->render32)
if (!video->rgb32)
vid->upsample = true;
if (video->fullscreen)
SDL_ShowCursor(SDL_DISABLE);
fmt = vid->screen->format;
if (vid->render32)
{
RARCH_LOG("SDL: Creating 32-bit buffer.\n");
vid->buffer = SDL_CreateRGBSurface(SDL_SWSURFACE, RARCH_SCALE_BASE * video->input_scale,
RARCH_SCALE_BASE * video->input_scale, 32,
fmt->Rmask, fmt->Bmask, fmt->Gmask, fmt->Amask);
}
else
{
RARCH_LOG("SDL: Creating 16-bit buffer.\n");
vid->buffer = SDL_CreateRGBSurface(SDL_SWSURFACE, RARCH_SCALE_BASE * video->input_scale,
RARCH_SCALE_BASE * video->input_scale, 16,
fmt->Rmask, fmt->Gmask, fmt->Bmask, fmt->Amask);
}
vid->buffer = SDL_CreateRGBSurface(SDL_SWSURFACE, RARCH_SCALE_BASE * video->input_scale,
RARCH_SCALE_BASE * video->input_scale, 32,
fmt->Rmask, fmt->Bmask, fmt->Gmask, fmt->Amask);
RARCH_LOG("[Debug]: SDL Pixel format: Rshift = %u, Gshift = %u, Bshift = %u\n",
(unsigned)fmt->Rshift, (unsigned)fmt->Gshift, (unsigned)fmt->Bshift);

View File

@ -113,8 +113,7 @@ static void *vg_init(const video_info_t *video, const input_driver_t **input, vo
win_height = vg->mScreenHeight;
}
if (!vg->driver->set_video_mode(win_width, win_height,
g_settings.video.force_16bit ? 15 : 0, video->fullscreen))
if (!vg->driver->set_video_mode(win_width, win_height, video->fullscreen))
{
free(vg);
return NULL;

View File

@ -61,9 +61,6 @@
# suggests RetroArch to use that particular monitor.
# video_monitor_index = 0
# Force 16-bit colors. Apparently some video cards in use today have troubles with 32-bit ...
# video_force_16bit = false
# Forcibly disable composition. Only works in Windows Vista/7 for now.
# video_disable_composition = false

View File

@ -154,7 +154,6 @@ void config_set_defaults(void)
g_settings.video.monitor_index = monitor_index;
g_settings.video.fullscreen_x = fullscreen_x;
g_settings.video.fullscreen_y = fullscreen_y;
g_settings.video.force_16bit = force_16bit;
g_settings.video.disable_composition = disable_composition;
g_settings.video.vsync = vsync;
g_settings.video.smooth = video_smooth;
@ -430,7 +429,6 @@ bool config_load_file(const char *path)
CONFIG_GET_BOOL(video.windowed_fullscreen, "video_windowed_fullscreen");
CONFIG_GET_INT(video.monitor_index, "video_monitor_index");
CONFIG_GET_BOOL(video.force_16bit, "video_force_16bit");
CONFIG_GET_BOOL(video.disable_composition, "video_disable_composition");
CONFIG_GET_BOOL(video.vsync, "video_vsync");
CONFIG_GET_BOOL(video.smooth, "video_smooth");