Skip to content

Commit 0601036

Browse files
committed
2 parents 0dfbf94 + 2cc0689 commit 0601036

5 files changed

Lines changed: 91 additions & 15 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @JoeMatt @twinaphex

.github/workflows/pull-request.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Pull Request on Branch Push
2+
on:
3+
push:
4+
branches-ignore:
5+
- staging
6+
- launchpad
7+
- production
8+
jobs:
9+
auto-pull-request:
10+
name: PullRequestAction
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: pull-request-action
14+
uses: vsoch/pull-request-action@master
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
BRANCH_PREFIX: 'feature/'
18+
PULL_REQUEST_BRANCH: 'master'
19+
PULL_REQUEST_DRAFT: true

.github/workflows/rebase.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# https://github.com/marketplace/actions/automatic-rebase
2+
name: Automatic Rebase
3+
on:
4+
issue_comment:
5+
types: [created]
6+
jobs:
7+
rebase:
8+
name: Rebase
9+
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout the latest code
13+
uses: actions/checkout@v2
14+
with:
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
17+
- name: Automatic Rebase
18+
uses: cirrus-actions/[email protected]
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,17 @@ else ifeq ($(platform), libnx)
188188
STATIC_LINKING = 1
189189

190190
# Lightweight PS3 Homebrew SDK
191-
else ifeq ($(platform), psl1ght)
192-
TARGET := $(TARGET_NAME)_libretro_$(platform).a
193-
CC = $(PS3DEV)/ppu/bin/ppu-gcc$
194-
CXX = $(PS3DEV)/ppu/bin/ppu-g++$
195-
AR = $(PS3DEV)/ppu/bin/ppu-ar$
191+
else ifneq (,$(filter $(platform), ps3 psl1ght))
192+
TARGET := $(TARGET_NAME)_libretro_$(platform).a
193+
CC = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)gcc$(EXE_EXT)
194+
CXX = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)g++$(EXE_EXT)
195+
AR = $(PS3DEV)/ppu/bin/ppu-$(COMMONLV)ar$(EXE_EXT)
196196
STATIC_LINKING = 1
197-
FLAGS += -DMSB_FIRST
197+
FLAGS += -DMSB_FIRST -D__PS3__
198198
OLD_GCC = 1
199+
ifeq ($(platform), psl1ght)
200+
FLAGS += -D__PSL1GHT__
201+
endif
199202

200203
# PSP
201204
else ifeq ($(platform), psp1)

libretro.c

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ static void update_input(void)
163163
joypad0Buttons[BUTTON_4] = 0x00;
164164
joypad0Buttons[BUTTON_5] = 0x00;
165165
joypad0Buttons[BUTTON_6] = 0x00;
166+
joypad0Buttons[BUTTON_7] = 0x00;
167+
joypad0Buttons[BUTTON_8] = 0x00;
168+
joypad0Buttons[BUTTON_9] = 0x00;
169+
joypad0Buttons[BUTTON_s] = 0x00;
170+
joypad0Buttons[BUTTON_d] = 0x00;
166171

167172
joypad1Buttons[BUTTON_U] = 0x00;
168173
joypad1Buttons[BUTTON_D] = 0x00;
@@ -180,6 +185,11 @@ static void update_input(void)
180185
joypad1Buttons[BUTTON_4] = 0x00;
181186
joypad1Buttons[BUTTON_5] = 0x00;
182187
joypad1Buttons[BUTTON_6] = 0x00;
188+
joypad1Buttons[BUTTON_7] = 0x00;
189+
joypad1Buttons[BUTTON_8] = 0x00;
190+
joypad1Buttons[BUTTON_9] = 0x00;
191+
joypad1Buttons[BUTTON_s] = 0x00;
192+
joypad1Buttons[BUTTON_d] = 0x00;
183193

184194
if (libretro_supports_bitmasks)
185195
{
@@ -257,20 +267,30 @@ static void update_input(void)
257267
joypad1Buttons[BUTTON_PAUSE] = 0xff;
258268
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_START))
259269
joypad1Buttons[BUTTON_OPTION] = 0xff;
260-
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_X))
270+
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_X) || (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_p)? 1 : 0))
261271
joypad1Buttons[BUTTON_0] = 0xff;
262-
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_L))
272+
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_L) || (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_q)? 1 : 0))
263273
joypad1Buttons[BUTTON_1] = 0xff;
264-
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_R))
274+
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_R) || (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_w)? 1 : 0))
265275
joypad1Buttons[BUTTON_2] = 0xff;
266-
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_L2))
276+
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_L2) || (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_e)? 1 : 0))
267277
joypad1Buttons[BUTTON_3] = 0xff;
268-
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_R2))
278+
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_R2) || (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_r)? 1 : 0))
269279
joypad1Buttons[BUTTON_4] = 0xff;
270-
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_L3))
280+
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_L3) || (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_t)? 1 : 0))
271281
joypad1Buttons[BUTTON_5] = 0xff;
272-
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_R3))
282+
if (ret[1] & (1 << RETRO_DEVICE_ID_JOYPAD_R3) || (input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_y)? 1 : 0))
273283
joypad1Buttons[BUTTON_6] = 0xff;
284+
if((input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_u)? 1 : 0))
285+
joypad1Buttons[BUTTON_7] = 0xff;
286+
if((input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_i)? 1 : 0))
287+
joypad1Buttons[BUTTON_8] = 0xff;
288+
if((input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_o)? 1 : 0))
289+
joypad1Buttons[BUTTON_9] = 0xff;
290+
if((input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_LEFTBRACKET)? 1 : 0))
291+
joypad1Buttons[BUTTON_s] = 0xff;
292+
if((input_state_cb(0, RETRO_DEVICE_KEYBOARD, 0, RETROK_RIGHTBRACKET)? 1 : 0))
293+
joypad1Buttons[BUTTON_d] = 0xff;
274294
}
275295

276296
static void extract_basename(char *buf, const char *path, size_t size)
@@ -318,8 +338,8 @@ void retro_get_system_av_info(struct retro_system_av_info *info)
318338
info->timing.sample_rate = SAMPLERATE;
319339
info->geometry.base_width = game_width;
320340
info->geometry.base_height = game_height;
321-
info->geometry.max_width = TOMGetVideoModeWidth();
322-
info->geometry.max_height = TOMGetVideoModeHeight();
341+
info->geometry.max_width = 652; // Highest value encountered during testing
342+
info->geometry.max_height = vjs.hardwareTypeNTSC ? 240 : 256;
323343
info->geometry.aspect_ratio = 4.0 / 3.0;
324344
}
325345

@@ -548,5 +568,18 @@ void retro_run(void)
548568

549569
JaguarExecuteNew();
550570
SoundCallback(NULL, sampleBuffer, vjs.hardwareTypeNTSC==1?BUFNTSC:BUFPAL);
571+
572+
// Resolution changed
573+
if ((tomWidth != videoWidth || tomHeight != videoHeight) && tomWidth > 0 && tomHeight > 0)
574+
{
575+
videoWidth = tomWidth, videoHeight = tomHeight;
576+
game_width = tomWidth, game_height = tomHeight;
577+
578+
JaguarSetScreenPitch(game_width);
579+
580+
retro_get_system_av_info(&g_av_info);
581+
environ_cb(RETRO_ENVIRONMENT_SET_GEOMETRY, &g_av_info);
582+
}
583+
551584
video_cb(videoBuffer, game_width, game_height, game_width << 2);
552585
}

0 commit comments

Comments
 (0)