Title buf hints. Purge samplerate opts.
This commit is contained in:
parent
f26b54c998
commit
b4ff622f32
23
gfx/ext.c
23
gfx/ext.c
|
@ -25,6 +25,11 @@
|
||||||
#include "dynamic.h"
|
#include "dynamic.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
#include "sdlwrap.h"
|
#include "sdlwrap.h"
|
||||||
|
#include "gfx_common.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_FREETYPE
|
||||||
|
#include "fonts.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool g_input_dead = true;
|
static bool g_input_dead = true;
|
||||||
static bool g_video_dead = true;
|
static bool g_video_dead = true;
|
||||||
|
@ -240,6 +245,21 @@ static bool setup_video(ext_t *ext, const video_info_t *video, const input_drive
|
||||||
font_color_g = font_color_g > 255 ? 255 : (font_color_g < 0 ? 0 : font_color_g);
|
font_color_g = font_color_g > 255 ? 255 : (font_color_g < 0 ? 0 : font_color_g);
|
||||||
font_color_b = font_color_b > 255 ? 255 : (font_color_b < 0 ? 0 : font_color_b);
|
font_color_b = font_color_b > 255 ? 255 : (font_color_b < 0 ? 0 : font_color_b);
|
||||||
|
|
||||||
|
const char *font = NULL;
|
||||||
|
#ifdef HAVE_FREETYPE
|
||||||
|
if (*g_settings.video.font_path)
|
||||||
|
font = g_settings.video.font_path;
|
||||||
|
else
|
||||||
|
font = font_renderer_get_default_font();
|
||||||
|
#else
|
||||||
|
font = *g_settings.video.font_path ?
|
||||||
|
g_settings.video.font_path : NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
char title_buf[128];
|
||||||
|
gfx_window_title_reset();
|
||||||
|
gfx_window_title(title_buf, sizeof(title_buf));
|
||||||
|
|
||||||
ssnes_video_info_t info = {
|
ssnes_video_info_t info = {
|
||||||
.width = video->width,
|
.width = video->width,
|
||||||
.height = video->height,
|
.height = video->height,
|
||||||
|
@ -252,9 +272,10 @@ static bool setup_video(ext_t *ext, const video_info_t *video, const input_drive
|
||||||
.color_format = video->rgb32 ? SSNES_COLOR_FORMAT_ARGB8888 : SSNES_COLOR_FORMAT_XRGB1555,
|
.color_format = video->rgb32 ? SSNES_COLOR_FORMAT_ARGB8888 : SSNES_COLOR_FORMAT_XRGB1555,
|
||||||
.xml_shader = xml_shader,
|
.xml_shader = xml_shader,
|
||||||
.cg_shader = cg_shader,
|
.cg_shader = cg_shader,
|
||||||
.ttf_font = *g_settings.video.font_path ? g_settings.video.font_path : NULL,
|
.ttf_font = font,
|
||||||
.ttf_font_size = g_settings.video.font_size,
|
.ttf_font_size = g_settings.video.font_size,
|
||||||
.ttf_font_color = (font_color_r << 16) | (font_color_g << 8) | (font_color_b << 0),
|
.ttf_font_color = (font_color_r << 16) | (font_color_g << 8) | (font_color_b << 0),
|
||||||
|
.title_hint = title_buf,
|
||||||
};
|
};
|
||||||
|
|
||||||
const ssnes_input_driver_t *input_driver = NULL;
|
const ssnes_input_driver_t *input_driver = NULL;
|
||||||
|
|
|
@ -108,7 +108,10 @@ typedef struct ssnes_video_info
|
||||||
// Can be disregarded.
|
// Can be disregarded.
|
||||||
const char *ttf_font;
|
const char *ttf_font;
|
||||||
unsigned ttf_font_size;
|
unsigned ttf_font_size;
|
||||||
unsigned ttf_font_color; // Font color, in format RGB888.
|
unsigned ttf_font_color; // Font color, in format ARGB8888. Alpha should be disregarded.
|
||||||
|
|
||||||
|
// A title that should be displayed in the title bar of the window.
|
||||||
|
const char *title_hint;
|
||||||
} ssnes_video_info_t;
|
} ssnes_video_info_t;
|
||||||
|
|
||||||
// Some convenience macros.
|
// Some convenience macros.
|
||||||
|
@ -236,7 +239,7 @@ typedef struct ssnes_video_driver
|
||||||
const char *ident;
|
const char *ident;
|
||||||
|
|
||||||
// Needs to be defined to SSNES_GRAPHICS_API_VERSION.
|
// Needs to be defined to SSNES_GRAPHICS_API_VERSION.
|
||||||
// This is used to detect API mismatches.
|
// This is used to detect API/ABI mismatches.
|
||||||
int api_version;
|
int api_version;
|
||||||
} ssnes_video_driver_t;
|
} ssnes_video_driver_t;
|
||||||
|
|
||||||
|
|
|
@ -132,8 +132,6 @@
|
||||||
# Desired audio latency in milliseconds. Might not be honored if driver can't provide given latency.
|
# Desired audio latency in milliseconds. Might not be honored if driver can't provide given latency.
|
||||||
# audio_latency = 64
|
# audio_latency = 64
|
||||||
|
|
||||||
# libsamplerate quality. Valid values are from 1 to 5. These values map to zero_order_hold, linear, sinc_fastest, sinc_medium and sinc_best respectively.
|
|
||||||
# audio_src_quality =
|
|
||||||
|
|
||||||
### Input
|
### Input
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue