Small updates.
This commit is contained in:
parent
10d9a1c6ba
commit
13c503160f
2
driver.h
2
driver.h
|
@ -61,7 +61,7 @@ typedef struct input_driver
|
|||
|
||||
typedef struct video_driver
|
||||
{
|
||||
void* (*init)(video_info_t *video, input_driver_t **input);
|
||||
void* (*init)(video_info_t *video, const input_driver_t **input);
|
||||
// Should the video driver act as an input driver as well? :)
|
||||
bool (*frame)(void* data, const uint16_t* frame, int width, int height);
|
||||
void (*free)(void* data);
|
||||
|
|
4
gl.c
4
gl.c
|
@ -88,7 +88,7 @@ static void glfw_free_input(void *data)
|
|||
free(data);
|
||||
}
|
||||
|
||||
static input_driver_t input_glfw = {
|
||||
static const input_driver_t input_glfw = {
|
||||
.poll = glfw_input_poll,
|
||||
.input_state = glfw_input_state,
|
||||
.free = glfw_free_input
|
||||
|
@ -171,7 +171,7 @@ static void gl_free(void *data)
|
|||
free(gl_buffer);
|
||||
}
|
||||
|
||||
static void* gl_init(video_info_t *video, input_driver_t **input)
|
||||
static void* gl_init(video_info_t *video, const input_driver_t **input)
|
||||
{
|
||||
gl_t *foo = malloc(sizeof(gl_t));
|
||||
if ( foo == NULL )
|
||||
|
|
11
ssnes.c
11
ssnes.c
|
@ -122,7 +122,7 @@ static void init_video_input(void)
|
|||
.input_scale = scale,
|
||||
};
|
||||
|
||||
driver.video_data = driver.video->init(&video, (input_driver_t**)&(driver.input));
|
||||
driver.video_data = driver.video->init(&video, &(driver.input));
|
||||
|
||||
if ( driver.video_data == NULL )
|
||||
{
|
||||
|
@ -155,16 +155,15 @@ static void video_frame(const uint16_t *data, unsigned width, unsigned height)
|
|||
if ( !video_active )
|
||||
return;
|
||||
|
||||
uint16_t output[width * height];
|
||||
#if VIDEO_FILTER == FILTER_HQ2X
|
||||
uint16_t outputHQ2x[width * height * 2 * 2];
|
||||
#endif
|
||||
#if VIDEO_FILTER == FILTER_HQ4X
|
||||
#elif VIDEO_FILTER == FILTER_HQ4X
|
||||
uint16_t outputHQ4x[width * height * 4 * 4];
|
||||
#else
|
||||
uint16_t output[width * height];
|
||||
#endif
|
||||
|
||||
int y;
|
||||
for ( y = 0; y < height; y++ )
|
||||
for ( int y = 0; y < height; y++ )
|
||||
{
|
||||
const uint16_t *src = data + y * 1024;
|
||||
uint16_t *dst = output + y * width;
|
||||
|
|
Loading…
Reference in New Issue