first incomplete pass at options
layout is done, need to polish up the frontend and emulator options and sort out the mess of input overrides
This commit is contained in:
parent
501aa77d14
commit
3cfd1313c6
14 changed files with 1278 additions and 179 deletions
101
src/common/api.c
101
src/common/api.c
|
|
@ -126,6 +126,7 @@ static SDL_Rect asset_rects[] = {
|
|||
[ASSET_WHITE_PILL] = (SDL_Rect){SCALE4( 1, 1,30,30)},
|
||||
[ASSET_BLACK_PILL] = (SDL_Rect){SCALE4(33, 1,30,30)},
|
||||
[ASSET_DARK_GRAY_PILL] = (SDL_Rect){SCALE4(65, 1,30,30)},
|
||||
[ASSET_OPTION] = (SDL_Rect){SCALE4(97, 1,20,20)},
|
||||
[ASSET_BUTTON] = (SDL_Rect){SCALE4( 1,33,20,20)},
|
||||
[ASSET_PAGE_BG] = (SDL_Rect){SCALE4(64,33,15,15)},
|
||||
[ASSET_STATE_BG] = (SDL_Rect){SCALE4(23,54, 8, 8)},
|
||||
|
|
@ -144,6 +145,9 @@ static SDL_Rect asset_rects[] = {
|
|||
[ASSET_BATTERY_FILL] = (SDL_Rect){SCALE4(81,33,12, 6)},
|
||||
[ASSET_BATTERY_FILL_LOW]= (SDL_Rect){SCALE4( 1,55,12, 6)},
|
||||
[ASSET_BATTERY_BOLT] = (SDL_Rect){SCALE4(81,41,12, 6)},
|
||||
|
||||
[ASSET_SCROLL_UP] = (SDL_Rect){SCALE4(97,23,24, 6)},
|
||||
[ASSET_SCROLL_DOWN] = (SDL_Rect){SCALE4(97,31,24, 6)},
|
||||
};
|
||||
static uint32_t asset_rgbs[ASSET_COLORS];
|
||||
GFX_Fonts font;
|
||||
|
|
@ -155,7 +159,7 @@ SDL_Surface* GFX_init(int mode) {
|
|||
SDL_ShowCursor(0);
|
||||
TTF_Init();
|
||||
|
||||
gfx.vsync = 1;
|
||||
gfx.vsync = VSYNC_LENIENT;
|
||||
gfx.mode = mode;
|
||||
|
||||
// we're drawing to the (triple-buffered) framebuffer directly
|
||||
|
|
@ -208,6 +212,7 @@ SDL_Surface* GFX_init(int mode) {
|
|||
asset_rgbs[ASSET_WHITE_PILL] = RGB_WHITE;
|
||||
asset_rgbs[ASSET_BLACK_PILL] = RGB_BLACK;
|
||||
asset_rgbs[ASSET_DARK_GRAY_PILL]= RGB_DARK_GRAY;
|
||||
asset_rgbs[ASSET_OPTION] = RGB_DARK_GRAY;
|
||||
asset_rgbs[ASSET_BUTTON] = RGB_WHITE;
|
||||
asset_rgbs[ASSET_PAGE_BG] = RGB_WHITE;
|
||||
asset_rgbs[ASSET_STATE_BG] = RGB_WHITE;
|
||||
|
|
@ -229,6 +234,9 @@ SDL_Surface* GFX_init(int mode) {
|
|||
|
||||
return gfx.screen;
|
||||
}
|
||||
void GFX_setMode(int mode) {
|
||||
gfx.mode = mode;
|
||||
}
|
||||
void GFX_quit(void) {
|
||||
TTF_CloseFont(font.large);
|
||||
TTF_CloseFont(font.medium);
|
||||
|
|
@ -270,9 +278,10 @@ void GFX_startFrame(void) {
|
|||
void GFX_flip(SDL_Surface* screen) {
|
||||
static int ticks = 0;
|
||||
ticks += 1;
|
||||
if (gfx.vsync) {
|
||||
if (gfx.vsync!=VSYNC_OFF) {
|
||||
// this limiting condition helps SuperFX chip games
|
||||
#define FRAME_BUDGET 17 // 60fps
|
||||
if (frame_start==0 || SDL_GetTicks()-frame_start<FRAME_BUDGET) { // only wait if we're under frame budget
|
||||
if (gfx.vsync==VSYNC_STRICT || frame_start==0 || SDL_GetTicks()-frame_start<FRAME_BUDGET) { // only wait if we're under frame budget
|
||||
int arg = 1;
|
||||
ioctl(gfx.fb, OWLFB_WAITFORVSYNC, &arg);
|
||||
}
|
||||
|
|
@ -285,6 +294,20 @@ void GFX_flip(SDL_Surface* screen) {
|
|||
if (gfx.buffer>=GFX_BUFFER_COUNT) gfx.buffer -= GFX_BUFFER_COUNT;
|
||||
screen->pixels = gfx.map + (gfx.buffer * gfx.buffer_size);
|
||||
}
|
||||
void GFX_sync(void) {
|
||||
#define FRAME_BUDGET 17 // ~60fps
|
||||
if (gfx.vsync!=VSYNC_OFF) {
|
||||
// this limiting condition helps SuperFX chip games
|
||||
if (gfx.vsync==VSYNC_STRICT || frame_start==0 || SDL_GetTicks()-frame_start<FRAME_BUDGET) { // only wait if we're under frame budget
|
||||
int arg = 1;
|
||||
ioctl(gfx.fb, OWLFB_WAITFORVSYNC, &arg);
|
||||
}
|
||||
}
|
||||
else {
|
||||
uint32_t frame_duration = SDL_GetTicks() - frame_start;
|
||||
if (frame_duration<FRAME_BUDGET) SDL_Delay(FRAME_BUDGET-frame_duration);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_Surface* GFX_getBufferCopy(void) { // must be freed by caller
|
||||
int buffer = gfx.buffer - 1;
|
||||
|
|
@ -607,6 +630,78 @@ int GFX_blitButtonGroup(char** pairs, SDL_Surface* dst, int align_right) {
|
|||
return ow;
|
||||
}
|
||||
|
||||
#define MAX_TEXT_LINES 3
|
||||
void GFX_sizeText(TTF_Font* font, char* str, int leading, int* w, int* h) {
|
||||
char* lines[MAX_TEXT_LINES];
|
||||
int count = 0;
|
||||
|
||||
char* tmp;
|
||||
lines[count++] = str;
|
||||
while ((tmp=strchr(lines[count-1], '\n'))!=NULL) {
|
||||
if (count+1>MAX_TEXT_LINES) break; // TODO: bail
|
||||
lines[count++] = tmp+1;
|
||||
}
|
||||
*h = count * leading;
|
||||
|
||||
int mw = 0;
|
||||
char line[256];
|
||||
for (int i=0; i<count; i++) {
|
||||
int len;
|
||||
if (i+1<count) {
|
||||
len = lines[i+1]-lines[i]-1;
|
||||
if (len) strncpy(line, lines[i], len);
|
||||
line[len] = '\0';
|
||||
}
|
||||
else {
|
||||
len = strlen(lines[i]);
|
||||
strcpy(line, lines[i]);
|
||||
}
|
||||
|
||||
if (len) {
|
||||
int lw;
|
||||
TTF_SizeUTF8(font, line, &lw, NULL);
|
||||
if (lw>mw) mw = lw;
|
||||
}
|
||||
}
|
||||
*w = mw;
|
||||
}
|
||||
void GFX_blitText(TTF_Font* font, char* str, int leading, SDL_Color color, SDL_Surface* dst, SDL_Rect* dst_rect) {
|
||||
if (dst_rect==NULL) dst_rect = &(SDL_Rect){0,0,SCREEN_WIDTH,SCREEN_HEIGHT};
|
||||
|
||||
char* lines[MAX_TEXT_LINES];
|
||||
int count = 0;
|
||||
|
||||
char* tmp;
|
||||
lines[count++] = str;
|
||||
while ((tmp=strchr(lines[count-1], '\n'))!=NULL) {
|
||||
if (count+1>MAX_TEXT_LINES) break; // TODO: bail
|
||||
lines[count++] = tmp+1;
|
||||
}
|
||||
int x = dst_rect->x;
|
||||
int y = dst_rect->y;
|
||||
|
||||
SDL_Surface* text;
|
||||
char line[256];
|
||||
for (int i=0; i<count; i++) {
|
||||
int len;
|
||||
if (i+1<count) {
|
||||
len = lines[i+1]-lines[i]-1;
|
||||
if (len) strncpy(line, lines[i], len);
|
||||
line[len] = '\0';
|
||||
}
|
||||
else {
|
||||
len = strlen(lines[i]);
|
||||
strcpy(line, lines[i]);
|
||||
}
|
||||
|
||||
if (len) {
|
||||
text = TTF_RenderUTF8_Blended(font, line, color);
|
||||
SDL_BlitSurface(text, NULL, dst, &(SDL_Rect){x+((dst_rect->w-text->w)/2),y+(i*leading)});
|
||||
SDL_FreeSurface(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
// based on picoarch's audio
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ enum {
|
|||
ASSET_WHITE_PILL,
|
||||
ASSET_BLACK_PILL,
|
||||
ASSET_DARK_GRAY_PILL,
|
||||
ASSET_OPTION,
|
||||
ASSET_BUTTON,
|
||||
ASSET_PAGE_BG,
|
||||
ASSET_STATE_BG,
|
||||
|
|
@ -50,6 +51,9 @@ enum {
|
|||
ASSET_BATTERY_FILL,
|
||||
ASSET_BATTERY_FILL_LOW,
|
||||
ASSET_BATTERY_BOLT,
|
||||
|
||||
ASSET_SCROLL_UP,
|
||||
ASSET_SCROLL_DOWN,
|
||||
};
|
||||
|
||||
typedef struct GFX_Fonts {
|
||||
|
|
@ -66,12 +70,20 @@ enum {
|
|||
};
|
||||
|
||||
SDL_Surface* GFX_init(int mode);
|
||||
void GFX_setMode(int mode);
|
||||
void GFX_clear(SDL_Surface* screen);
|
||||
void GFX_clearAll(void);
|
||||
void GFX_startFrame(void);
|
||||
void GFX_flip(SDL_Surface* screen);
|
||||
void GFX_sync(void); // call this to maintain 60fps when not calling GFX_flip() this frame
|
||||
void GFX_quit(void);
|
||||
|
||||
enum {
|
||||
VSYNC_OFF = 0,
|
||||
VSYNC_LENIENT, // default
|
||||
VSYNC_STRICT,
|
||||
};
|
||||
|
||||
int GFX_getVsync(void);
|
||||
void GFX_setVsync(int vsync);
|
||||
|
||||
|
|
@ -90,6 +102,9 @@ void GFX_blitMessage(char* msg, SDL_Surface* dst, SDL_Rect* dst_rect);
|
|||
int GFX_blitHardwareGroup(SDL_Surface* dst, int show_setting);
|
||||
int GFX_blitButtonGroup(char** hints, SDL_Surface* dst, int align_right);
|
||||
|
||||
void GFX_sizeText(TTF_Font* font, char* str, int leading, int* w, int* h);
|
||||
void GFX_blitText(TTF_Font* font, char* str, int leading, SDL_Color color, SDL_Surface* dst, SDL_Rect* dst_rect);
|
||||
|
||||
///////////////////////////////
|
||||
|
||||
typedef struct SND_Frame {
|
||||
|
|
@ -104,6 +119,7 @@ void SND_quit(void);
|
|||
///////////////////////////////
|
||||
|
||||
enum {
|
||||
BTN_ID_NONE = -1,
|
||||
BTN_ID_UP,
|
||||
BTN_ID_DOWN,
|
||||
BTN_ID_LEFT,
|
||||
|
|
|
|||
1141
src/minarch/main.c
1141
src/minarch/main.c
File diff suppressed because it is too large
Load diff
|
|
@ -6,9 +6,11 @@ TARGET = minarch.elf
|
|||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
CFLAGS = -marm -mtune=cortex-a9 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7-a -fomit-frame-pointer
|
||||
CFLAGS += -I. -I../common -I./libretro-common/include -DPLATFORM=\"$(UNION_PLATFORM)\" -Ofast # -Wall -Wno-unused-variable -Wno-unused-function
|
||||
CFLAGS += -I. -I../common -I./libretro-common/include -DPLATFORM=\"$(UNION_PLATFORM)\" -Ofast
|
||||
LDFLAGS = -ldl -lSDL -lSDL_image -lSDL_ttf -lmsettings -lpthread
|
||||
#CFLAGS += -Wall -Wno-unused-variable -Wno-unused-function
|
||||
# CFLAGS += -fsanitize=address -fno-common
|
||||
LDFLAGS = -ldl -lSDL -lSDL_image -lSDL_ttf -lmsettings -lpthread # -lasan
|
||||
# LDFLAGS += -lasan
|
||||
|
||||
all:
|
||||
$(CC) main.c ../common/scaler_neon.c ../common/utils.c ../common/api.c -o $(TARGET) $(CFLAGS) $(LDFLAGS)
|
||||
|
|
|
|||
23
src/minarch/overrides.h
Normal file
23
src/minarch/overrides.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef OVERRIDES_H
|
||||
#define OVERRIDES_H
|
||||
|
||||
typedef struct OptionOverride {
|
||||
char* key;
|
||||
char* value;
|
||||
int disable; // hides from user
|
||||
} OptionOverride;
|
||||
|
||||
typedef struct ButtonMapping {
|
||||
char* name;
|
||||
int retro;
|
||||
int local;
|
||||
} ButtonMapping;
|
||||
|
||||
// TODO: not strictly overrides anymore...
|
||||
typedef struct CoreOverrides {
|
||||
char* core_name;
|
||||
OptionOverride* option_overrides;
|
||||
ButtonMapping* button_mapping;
|
||||
} CoreOverrides;
|
||||
|
||||
#endif
|
||||
28
src/minarch/overrides/fceumm.h
Normal file
28
src/minarch/overrides/fceumm.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#include "overrides.h"
|
||||
|
||||
static CoreOverrides fceumm_overrides = {
|
||||
.core_name = "fceumm",
|
||||
.option_overrides = (OptionOverride[]){
|
||||
{"fceumm_sndquality", "High"}, // why does it default to low :sob:
|
||||
{"fceumm_sndvolume", "10"},
|
||||
// {"fceumm_sndlowpass", "enabled"}, // too muffled for my tastes
|
||||
{NULL,NULL},
|
||||
},
|
||||
.button_mapping = (ButtonMapping[]){
|
||||
{"UP", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
|
||||
{"DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
|
||||
{"LEFT", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
|
||||
{"RIGHT", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
|
||||
{"SELECT", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
|
||||
{"START", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
|
||||
{"A BUTTON", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
|
||||
{"B BUTTON", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
|
||||
{"A TURBO", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_NONE},
|
||||
{"B TURBO", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_NONE},
|
||||
{"CHANGE DISK", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_NONE},
|
||||
{"INSERT DISK", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_NONE},
|
||||
{"INSERT COIN", RETRO_DEVICE_ID_JOYPAD_R2, BTN_ID_NONE},
|
||||
{NULL,0,0},
|
||||
},
|
||||
};
|
||||
|
||||
27
src/minarch/overrides/gambatte.h
Normal file
27
src/minarch/overrides/gambatte.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include "overrides.h"
|
||||
|
||||
CoreOverrides gambatte_overrides = {
|
||||
.core_name = "gambatte",
|
||||
.option_overrides = (OptionOverride[]){
|
||||
{"gambatte_gb_colorization", "internal"},
|
||||
{"gambatte_gb_internal_palette", "TWB64 - Pack 1"},
|
||||
{"gambatte_gb_palette_twb64_1", "TWB64 038 - Pokemon mini Ver."},
|
||||
{"gambatte_gb_bootloader", "disabled"},
|
||||
{NULL,NULL},
|
||||
},
|
||||
.button_mapping = (ButtonMapping[]){
|
||||
{"UP", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
|
||||
{"DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
|
||||
{"LEFT", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
|
||||
{"RIGHT", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
|
||||
{"SELECT", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
|
||||
{"START", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
|
||||
{"A BUTTON", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
|
||||
{"B BUTTON", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
|
||||
{"A TURBO", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_NONE},
|
||||
{"B TURBO", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_NONE},
|
||||
{"PREV PAL", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_NONE},
|
||||
{"NEXT PAL", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_NONE},
|
||||
{NULL,0,0},
|
||||
},
|
||||
};
|
||||
24
src/minarch/overrides/gpsp.h
Normal file
24
src/minarch/overrides/gpsp.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include "overrides.h"
|
||||
|
||||
static CoreOverrides gpsp_overrides = {
|
||||
.core_name = "gpsp",
|
||||
.option_overrides = (OptionOverride[]){
|
||||
{"gpsp_save_method", "libretro", 1},
|
||||
{NULL,NULL},
|
||||
},
|
||||
.button_mapping = (ButtonMapping[]){
|
||||
{"UP", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
|
||||
{"DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
|
||||
{"LEFT", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
|
||||
{"RIGHT", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
|
||||
{"SELECT", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
|
||||
{"START", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
|
||||
{"A BUTTON", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
|
||||
{"B BUTTON", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
|
||||
{"A TURBO", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_NONE},
|
||||
{"B TURBO", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_NONE},
|
||||
{"L BUTTON", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
|
||||
{"R BUTTON", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
|
||||
{NULL,0,0},
|
||||
},
|
||||
};
|
||||
22
src/minarch/overrides/pcsx_rearmed.h
Normal file
22
src/minarch/overrides/pcsx_rearmed.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include "overrides.h"
|
||||
|
||||
static CoreOverrides pcsx_rearmed_overrides = {
|
||||
.core_name = "pcsx_rearmed",
|
||||
.button_mapping = (ButtonMapping[]){
|
||||
{"UP", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
|
||||
{"DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
|
||||
{"LEFT", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
|
||||
{"RIGHT", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
|
||||
{"SELECT", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
|
||||
{"START", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
|
||||
{"CIRCLE", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
|
||||
{"CROSS", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
|
||||
{"TRIANGLE", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_X},
|
||||
{"SQUARE", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_Y},
|
||||
{"L1 BUTTON", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
|
||||
{"R1 BUTTON", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
|
||||
{"L2 BUTTON", RETRO_DEVICE_ID_JOYPAD_L2, BTN_ID_L2},
|
||||
{"R2 BUTTON", RETRO_DEVICE_ID_JOYPAD_R2, BTN_ID_R2},
|
||||
{NULL,0,0},
|
||||
},
|
||||
};
|
||||
24
src/minarch/overrides/picodrive.h
Normal file
24
src/minarch/overrides/picodrive.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include "overrides.h"
|
||||
|
||||
static CoreOverrides picodrive_overrides = {
|
||||
.core_name = "picodrive",
|
||||
.option_overrides = (OptionOverride[]){
|
||||
{"picodrive_sound_rate", "41000", 1},
|
||||
{NULL,NULL},
|
||||
},
|
||||
.button_mapping = (ButtonMapping[]){
|
||||
{"UP", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
|
||||
{"DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
|
||||
{"LEFT", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
|
||||
{"RIGHT", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
|
||||
{"MODE", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
|
||||
{"START", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
|
||||
{"A BUTTON", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_Y},
|
||||
{"B BUTTON", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_X},
|
||||
{"C BUTTON", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
|
||||
{"X BUTTON", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_B},
|
||||
{"Y BUTTON", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_L1},
|
||||
{"Z BUTTON", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
|
||||
{NULL,0,0},
|
||||
},
|
||||
};
|
||||
23
src/minarch/overrides/pokemini.h
Normal file
23
src/minarch/overrides/pokemini.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include "overrides.h"
|
||||
|
||||
static CoreOverrides pokemini_overrides = {
|
||||
.core_name = "pokemini",
|
||||
.option_overrides = (OptionOverride[]){
|
||||
{"pokemini_palette", "Old"},
|
||||
{"pokemini_piezofilter", "disabled"},
|
||||
{"pokemini_lowpass_filter", "enabled"},
|
||||
{NULL,NULL},
|
||||
},
|
||||
.button_mapping = (ButtonMapping[]){
|
||||
{"UP", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
|
||||
{"DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
|
||||
{"LEFT", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
|
||||
{"RIGHT", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
|
||||
{"A BUTTON", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
|
||||
{"B BUTTON", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
|
||||
{"C BUTTON", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
|
||||
{"SHAKE", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
|
||||
{"POWER", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
|
||||
{NULL,0,0},
|
||||
},
|
||||
};
|
||||
20
src/minarch/overrides/snes9x2005_plus.h
Normal file
20
src/minarch/overrides/snes9x2005_plus.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include "overrides.h"
|
||||
|
||||
static CoreOverrides snes9x2005_plus_overrides = {
|
||||
.core_name = "snes9x2005_plus",
|
||||
.button_mapping = (ButtonMapping[]){
|
||||
{"UP", RETRO_DEVICE_ID_JOYPAD_UP, BTN_ID_UP},
|
||||
{"DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN, BTN_ID_DOWN},
|
||||
{"LEFT", RETRO_DEVICE_ID_JOYPAD_LEFT, BTN_ID_LEFT},
|
||||
{"RIGHT", RETRO_DEVICE_ID_JOYPAD_RIGHT, BTN_ID_RIGHT},
|
||||
{"SELECT", RETRO_DEVICE_ID_JOYPAD_SELECT, BTN_ID_SELECT},
|
||||
{"START", RETRO_DEVICE_ID_JOYPAD_START, BTN_ID_START},
|
||||
{"Y BUTTON", RETRO_DEVICE_ID_JOYPAD_Y, BTN_ID_Y},
|
||||
{"X BUTTON", RETRO_DEVICE_ID_JOYPAD_X, BTN_ID_X},
|
||||
{"B BUTTON", RETRO_DEVICE_ID_JOYPAD_B, BTN_ID_B},
|
||||
{"A BUTTON", RETRO_DEVICE_ID_JOYPAD_A, BTN_ID_A},
|
||||
{"L BUTTON", RETRO_DEVICE_ID_JOYPAD_L, BTN_ID_L1},
|
||||
{"R BUTTON", RETRO_DEVICE_ID_JOYPAD_R, BTN_ID_R1},
|
||||
{NULL,0,0},
|
||||
},
|
||||
};
|
||||
|
|
@ -1261,7 +1261,7 @@ int main (int argc, char *argv[]) {
|
|||
selected = total-1;
|
||||
int start = total - MAIN_ROW_COUNT;
|
||||
top->start = (start<0) ? 0 : start;
|
||||
top->end = total;
|
||||
top->end = total;
|
||||
}
|
||||
else if (selected<top->start) {
|
||||
top->start -= 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue