mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-04 06:11:17 +00:00
commit
2c8ed13ec1
@ -46,9 +46,9 @@ typedef struct sdl2_tex
|
||||
{
|
||||
SDL_Texture *tex;
|
||||
|
||||
int w;
|
||||
int h;
|
||||
int pitch;
|
||||
unsigned w;
|
||||
unsigned h;
|
||||
size_t pitch;
|
||||
bool active;
|
||||
bool rgb32;
|
||||
} sdl2_tex_t;
|
||||
@ -190,12 +190,12 @@ static void sdl2_render_msg(sdl2_video_t *vid, const char *msg)
|
||||
|
||||
SDL_Rect srcrect = {
|
||||
tex_x, tex_y,
|
||||
gly->width, gly->height
|
||||
(int)gly->width, (int)gly->height
|
||||
};
|
||||
|
||||
SDL_Rect dstrect = {
|
||||
x + delta_x + off_x, y + delta_y + off_y,
|
||||
gly->width, gly->height
|
||||
(int)gly->width, (int)gly->height
|
||||
};
|
||||
|
||||
SDL_RenderCopyEx(vid->renderer, vid->font.tex, &srcrect, &dstrect, 0, NULL, SDL_FLIP_NONE);
|
||||
@ -251,7 +251,7 @@ static void sdl2_init_renderer(sdl2_video_t *vid)
|
||||
static void sdl_refresh_renderer(sdl2_video_t *vid)
|
||||
{
|
||||
SDL_RenderClear(vid->renderer);
|
||||
SDL_Rect r = { vid->vp.x, vid->vp.y, vid->vp.width, vid->vp.height };
|
||||
SDL_Rect r = { vid->vp.x, vid->vp.y, (int)vid->vp.width, (int)vid->vp.height };
|
||||
SDL_RenderSetViewport(vid->renderer, &r);
|
||||
|
||||
// breaks int scaling
|
||||
|
@ -62,13 +62,13 @@ static bool sdl_key_pressed(int key)
|
||||
|
||||
sym = input_keymaps_translate_rk_to_keysym((enum retro_key)key);
|
||||
|
||||
#if HAVE_SDL2
|
||||
#ifdef HAVE_SDL2
|
||||
sym = SDL_GetScancodeFromKey(sym);
|
||||
keymap = SDL_GetKeyboardState(&num_keys);
|
||||
#else
|
||||
keymap = SDL_GetKeyState(&num_keys);
|
||||
#endif
|
||||
if (sym < 0 || sym >= num_keys)
|
||||
if (sym < 0 || sym >= (unsigned)num_keys)
|
||||
return false;
|
||||
|
||||
return keymap[sym];
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_entries.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
|
||||
static int action_refresh_default(file_list_t *list, file_list_t *menu_list)
|
||||
{
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_entries.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
|
||||
static int action_select_default(unsigned type, const char *label,
|
||||
unsigned action)
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "menu.h"
|
||||
#include "menu_entries.h"
|
||||
#include "menu_navigation.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
|
||||
static int action_bind_up_or_down_generic(unsigned type, const char *label,
|
||||
unsigned action)
|
||||
|
Loading…
Reference in New Issue
Block a user