oomek / attractplus

Attract-Mode Plus
GNU General Public License v3.0
41 stars 14 forks source link

Assigning analog triggers to Next Page/Letter makes application unresponsive to inputs #68

Open rxbrad opened 3 months ago

rxbrad commented 3 months ago

Using v3.0.8, compiled on Ubuntu 24.04

oomek commented 3 months ago

I'm unable to reproduce this. Next Page and Next Letter are working as expected on my machine. Checked on Windows and on Arch Linux.

rxbrad commented 3 months ago

Hmm... Not sure if it's related to the wheel or some other aspect of the theme I'm using..

Using the "At The Arcade" theme from the pack available here: http://forum.attractmode.org/index.php?topic=3289.msg30534#msg30534

Will try to do some more troubleshooting...

oomek commented 3 months ago

Does it malfunction on any layout or just when using the wheel.nut?

rxbrad commented 3 months ago

It also affects the "Basic" theme, so apparently not wheel related...

Here's my attract.cfg...

``` # Generated by Attract-Mode Plus v3.0.8 # display All Games layout At-The-Arcade Atomiswave romlist MAME in_cycle yes in_menu yes filter All display Favorites layout Basic romlist MAME in_cycle yes in_menu yes filter Games rule Favourite equals 1 display High Score Competition layout At-The-Arcade Atomiswave romlist High Score Competition in_cycle no in_menu yes filter Games rule Favourite equals 1 display Hall of Fame Games layout At-The-Arcade Atomiswave romlist AKNF in_cycle yes in_menu yes filter Games rule Favourite equals 1 sound sound_volume 60 ambient_volume 60 movie_volume 50 input_map next_display W left Left left Joy0 PovXneg right Right right Joy0 PovXpos add_favourite LShift add_favourite Joy0 Button2 down Down down Joy0 PovYpos up Up up Joy0 PovYneg select Return select LControl select Joy0 Button0 select Joy0 Button9 back Escape back LAlt back Joy0 Button1 back Joy0 Button10 configure Tab configure Joy1 Button9 prev_letter Joy0 Button4 prev_page Joy0 Button5 screen_saver Joy1 Button10 next_page Joy0 Zpos next_letter Joy0 Rpos default back exit default up prev_game default down next_game default left prev_display default right next_display general language en exit_command exit_message Quit to Desktop? ui_font_size screen_saver_timeout 600 displays_menu_exit yes hide_brackets no group_clones yes startup_mode default confirm_favourites yes confirm_exit yes mouse_threshold 10 joystick_threshold 75 window_mode default screen_rotation none anti_aliasing 2 anisotropic 2 filter_wrap_mode default track_usage yes multiple_monitors yes smooth_images yes selection_max_step 128 selection_speed_ms 40 move_mouse_on_launch yes scrape_snaps yes scrape_marquees yes scrape_flyers no scrape_wheels yes scrape_fanart no scrape_videos yes scrape_overview yes thegamesdb_key power_saving no video_decoder menu_prompt Displays Menu menu_layout At-The-Arcade Atomiswave image_cache_mbytes 100 saver_config param basic_movie Yes param blank_start_cmd param blank_stop_cmd param blank_time 120 param image_collage No param movie_collage Yes param overlay_art wheel param preserve_ar Yes param rgb_movie No param sound Yes layout_config At-The-Arcade Atomiswave param enable_Lmarquee Yes param enable_ambience It's 1992 param enable_bg_scanline No param enable_bloom No param enable_colors No param enable_crt_scanline Light param enable_crt_scratches Yes param enable_crt_screenglow Medium param enable_favstar Right of Wheel param enable_frame Yes param enable_game_manu Title Only param enable_gameinfo Info and Enumerate param enable_gboxart No param enable_gcartart No param enable_gmarquee Marquee param enable_image Retro Animated param enable_ini_anim Yes param enable_nav_sound No param enable_pointer No param enable_song_title No param enable_verticlesnap Yes param enable_wl_bg No param ini_anim_trans_ms 1000 param letters_type Default param music_path param music_play_method Shuffle param mute_videos No param paramxx0 param paramxx1 param paramxx2 param paramxx3 param paramxx4 param paramxx5 param paramxx6 param paramxx7 param paramxx8 param scrlDelay 2000 param scrlSpeed 0.2 param set_ms_delay 1000 param set_music_delay 100 param song_title_time 3000 param transition_ms 300 param user_nextsong_key Custom5 param user_prevsong_key Custom4 param user_search_boxsize Small param user_search_key Custom1 param wheel_fade_ms 500 param wheel_fadeout No param wheel_logo_aspect Yes param wheel_poisition Adjust Right param wheel_pulse Once param wheel_slots 9 param wheel_type Round plugin SpecificDisplay enabled no param display Hall of Fame Games param trigger plugin ResFix enabled yes param emulators plugin UtilityMenu enabled no plugin KonamiCode enabled no plugin KeyboardSearch enabled yes param results_mode Show Results param trigger Custom1 plugin LaunchDecorator enabled yes param scriptExtensions sh param scriptRoot $HOME/scripts plugin FadeToGame enabled yes param fromGameRunTime 500 param toGameRunTime 500 plugin MultiMon enabled yes param mon2_art wheel param mon2_height 600 param mon2_preserve_aspect_ratio Yes param mon2_width 1024 param mon2_x 0 param mon2_y 0 plugin History.dat enabled no param button Joy1 Button10 param dat_path $HOME/.mame/history.dat param generate_index param index_clones Yes param rows 30 plugin Wheel Navigator enabled no plugin RocketLauncher enabled no plugin AudioMode enabled no param dir param info_button param skip_button ``` <\details>
oomek commented 3 months ago

I don't see anything abnormal in your cfg file. Btw it's better to just drag and drop the file because it's hard to read, the whole whitespace formatting is gone. Do you see anything abnormal in the console or last_run.log?

rxbrad commented 3 months ago

Here's a debug log of hitting previous page a couple times, and then next page. Inputs got stuck, so I then Alt-F4 exited...

``` Handling command: prev_page [Transition] type=ToNewSelection, var=-11 [Transition] type=FromOldSelection, var=11 FFmpeg: Reinit context to 320x240, pix_fmt: yuv420p End Video Thread - /home/arcade/.mame/videos/pengo.mp4 - bit_rate=58019, width=240, height=320 - displayed=12 - average qscore=14 [Transition] type=EndNavigation, var=0 Initializing resampler: in_sample_fmt=fltp, in_sample_rate=48000, out_sample_fmt=s16, out_sample_rate=48000 FFmpeg: Reinit context to 320x240, pix_fmt: yuv420p Handling command: next_page [Transition] type=ToNewSelection, var=11 [Transition] type=FromOldSelection, var=-11 [Transition] type=ToNewSelection, var=11 [Transition] type=FromOldSelection, var=-11 End Video Thread - /home/arcade/.mame/videos/mslug2.mp4 - bit_rate=445542, width=320, height=240 - displayed=457 - average qscore=15 [Transition] type=EndLayout, var=2 Attract-Mode ended normally ```
oomek commented 3 months ago

Hmm, the log says that Attract-Mode ended normally so it contradicts with your statement that AttractMode Plus stops responding to all inputs

rxbrad commented 3 months ago

The UI stops responding. It gets stuck with the last item in the list selected.

I can, however, Alt-Tab to open Ubuntu's app switcher, then Alt-F4 from there to exit AttractMode.

rxbrad commented 3 months ago

Here's a full debug log from the terminal.

AMP Debug Log.txt

oomek commented 3 months ago

Please check your key mappings. You have in your attract.cfg the following:

prev_page Joy0 Button5
next_page Joy0 Zpos

Confirm if the problem persist when you have it set to:

prev_page            PageUp
next_page            PageDown
oomek commented 3 months ago

So have you figured this out? Is it a bug or wrong config?

rxbrad commented 3 months ago

I remapped to PgUp/PgDn, and it appears to work correctly. Good catch.

It seems that the program doesn't play nice with inputs from gamepad analog triggers for whatever reason. (In my case, it's actually a standard arcade button switch mapped to the gamepad analog trigger on an IPAC-2 control interface board)

oomek commented 3 months ago

Will investigate the triggers mappings. Thanks.

oomek commented 2 months ago

I've checked AM+ on Arch Linux with wireless XBox One controller. I've mapped the following as in your config prev_page Joy0 Button5 next_page Joy0 Rpos Unfortunately I was not able to reproduce the problem you are having.

rxbrad commented 2 months ago

The triggers are analog on an actual gamepad.

Does AM+ perhaps consider Joy0 RPos as active until a corresponding Joy0 RNeg is triggered?

Because the trigger is mapped to a digital button input using the IPAC-2 arcade controller, that does not happen as it would on an actual gamepad.

oomek commented 2 months ago

Can't you configure ipac to not emulate the xbox controller but a standard gamepad? If it's working fine with normal xbox controller I can only assume that IPac xbox emulation is to blame.