@ploggy , no I only have built one or two cores to test it .
https://github.com/libretro/RetroArch/pull/5580
The PR is not merged yet because I've experimented some freeze/error screen so I want someone with more gx2 knowledge to review it and state if it is safe or not.
also actually alphamod of the overlay not working (I don't know how deal it with the RA embedded shader it missing a vertex color attribute to do it dynamically ?)
and some multiple overlay (like the gamepad overlay) have some buttons that does not scale properly (some of them scale properly other not ?)
that said the mame scanline overlay is very nice!
@rioray I'm wondering whether it can be decided per game which overlay to take as I saw a screenshot from a specific 19xx/1944 arcade border.
honestly I don't know , I played with overlay last night and it's a big pain to scale the custom viewport to fit the overlay screen.
most of the arcade overlay are for 1080p and a have usage of shader.
not perfect but with tweaking some 1943.zip.cfg .... (with choosing aspect ratio = config)
Code:
# Config created by Floob
# https://github.com/biscuits99/rp-video-manager
# http://www.youtube.com/c/SmartretroCoUk-Gaming
#video_shader = "/opt/retropie/emulators/retroarch/shader/arcade-bezel-shader/crt-pi-vertical.glslp"
#video_shader_enable = "true"
input_overlay = "sd:/retroarch/overlay/arcade/1943.cfg"
input_overlay_enable = true
input_overlay_opacity = 0.850000
input_overlay_scale = 1.000000
custom_viewport_width = "300"
custom_viewport_height = "400"
custom_viewport_x = "277"
custom_viewport_y = "40"
aspect_ratio_index = "22"
video_scale_integer = false
@QuarkTheAwesome another subject ,
in the waiting you fix your touch driver,
today I had fun with it,to bypass the problem of input press not detected using pad_state[0] |= VPAD_BUTTON_TOUCH;
I did a quick bad hack to add another analog_state : static int16_t analog_state[MAX_PADS][4/*3*/][2];
then I could use it in the touch detection
Code:
if (vpad.tpNormal.touched && vpad.tpNormal.validity == VPAD_VALID) {
struct video_viewport vp = {0};
video_driver_get_viewport_info(&vp);
VPADTouchData cal = {0};
/* Calibrates data to a 720p screen, seems to clamp outer 12px */
VPADGetTPCalibratedPoint(0, &cal, &(vpad.tpNormal));
/* Calibrate to viewport and save as axis 2 (idx 4,5) */
analog_state[0][2][0] = (int16_t)scaleTP(12.0f, 1268.0f, 0.0f, (float)(vp.full_width), (float)cal.x);
analog_state[0][2][1] = (int16_t)scaleTP(12.0f, 708.0f, 0.0f, (float)(vp.full_height), (float)cal.y);
//bad hack !
analog_state[0][3][0] = 1;
analog_state[0][3][1] +=1;
/* Emulating a button for touch; lets people assign it to menu
for that traditional RetroArch Wii U feel */
pad_state[0] |= VPAD_BUTTON_TOUCH;
} else {
/* This is probably 0 anyway */
pad_state[0] &= ~VPAD_BUTTON_TOUCH;
analog_state[0][3][0] = 0;
analog_state[0][3][1] = 0;
}
Code:
static int16_t wiiu_pointer_device_state(wiiu_input_t* wiiu, unsigned id)
{
switch (id)
{
case RETRO_DEVICE_ID_POINTER_PRESSED:
return wiiu->joypad->axis(0, 0xFFFF0007UL); // bad hack it give the tick count how the pointer is hold
// return wiiu->joypad->get_buttons(0) & VPAD_BUTTON_TOUCH;
case RETRO_DEVICE_ID_POINTER_X:
return wiiu->joypad->axis(0, 0xFFFF0004UL);
case RETRO_DEVICE_ID_POINTER_Y:
return wiiu->joypad->axis(0, 0xFFFF0005UL);
}
return 0;
}
then I could get the press state in my code and did things like
Code:
int p_press = input_state_cb(0, RETRO_DEVICE_POINTER, 0,RETRO_DEVICE_ID_POINTER_PRESSED);
if(p_press>25)mouse_left=1;
As sample , I quickly hook this in vice code , the virtual keyboard should respond to the touch (moving around , push key).
https://filebin.net/l3yq74woaopqvlnq/vice_x64_libretro.rpx.zip