Window Focus

A nice (keyboard based) front end for Arcade / Console game emulators.

Moderator: battlecat

Window Focus

Postby the_gamer » Sat Nov 08, 2014 2:13 pm

Hi There,

I have one huge Problem with wahcade, most emulators rune fine but when I start a linuxgame with exo-open or with a script, or a wine game, the game doesn't get the focus.
Either my script or wahcade has the focus but I can't get the game to get the focus. How to change that?

The game must have the focus or it is unplayable :( and uncontrollable, too. Have to shut everything down because I can't control it anymore.
the_gamer
 
Posts: 58
Joined: Wed May 04, 2011 8:45 pm

Re: Window Focus

Postby sairuk » Sun Nov 09, 2014 3:42 am

Do not recall hearing of this issue before, we need more information to assist. Distro, versions, commandlines, wahcade.log etc.
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: Window Focus

Postby the_gamer » Tue Nov 11, 2014 8:15 am

I will post everything. Where to find the wahcade log?
the_gamer
 
Posts: 58
Joined: Wed May 04, 2011 8:45 pm

Re: Window Focus

Postby sairuk » Tue Nov 11, 2014 11:11 am

Log file is available: ~/.wahcade/wahcade.log
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: Window Focus

Postby the_gamer » Tue Nov 11, 2014 4:56 pm

Hi there,

thanks for looking into the issue:
Wahcade-version: 152 built from wahcade-bzr using https://aur.archlinux.org/packages/wahcade-bzr
Distro: Archlinux
Kernel: 3.17.1
Wine: 1.7.29

Any more versions needed?

Log looks like only some wine warnings to me:
Code: Select all
[Tue Nov 11 16:46:35 2014]: [LAUNCH] Setting extension to: win
[Tue Nov 11 16:46:35 2014]: [PLUGIN] No plugin found for launcher_win
[Tue Nov 11 16:46:35 2014]: ******** Command from Wah!Cade is:  /games/winspielstarten.sh "/games/winscripte/Harveys neue Augen.win"
[Tue Nov 11 16:46:35 2014]: ******** Begin command output
fixme:heap:HeapSetInformation (nil) 1 (nil) 0
fixme:process:SetProcessDEPPolicy (1): stub
fixme:heap:HeapSetInformation (nil) 1 (nil) 0
fixme:win:EnumDisplayDevicesW ((null),0,0x32f928,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32f928,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0x32f57c,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",1,0x32f928,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x32f928,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x32f928,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0x32f928,0x00000000), stub!
err:ole:CoCreateInstance apartment not initialised


Starting skript does:
cd into the directory of the game
env XMODIFIERS='' WINEPREFIX="/home/cab/.wine" wine "$(cat "$1")"

with $1 being the name of the file with the path to the exe in it.
Simplified:
env XMODIFIERS='' WINEPREFIX="/home/cab/.wine" wine "/home/cab/.wine/…/Harvey.exe"


Any errors seen? But as I said… have the same issue when running linux games with the script you are using.
the_gamer
 
Posts: 58
Joined: Wed May 04, 2011 8:45 pm

Re: Window Focus

Postby sairuk » Wed Nov 12, 2014 2:40 am

Let's simplify things for testing (i don't have any of the games you mentioned to test). Can you try notepad to see if the keyboard is forwarded with your current approach.

Then,

You may not know that Mah!Cade supports launch plugins; one of the included formats is *.desktop so you can simply point the configuration file to a directory of *.desktop files and it will run them without an executable required (i.e. xdg-open)

A portion of a test ini just put together during my lunchbreak
Code: Select all
emulator_title                          Applications

### List Generation Settings ###
rom_path                                /usr/share/applications/
rom_extension                           desktop
dat_file
nms_file
catver_ini_file
list_generation_method                  rom_folder

### Execution Settings ###
emulator_executable
commandline_format                      "[rompath]/[name].[romext]"
alt_commandline_format_1
alt_commandline_format_2
game_specific_config_path


with the above setup i can run wine-notepad with the keyboard forwarded correctly.
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am

Re: Window Focus

Postby the_gamer » Wed Nov 12, 2014 6:30 pm

I also tried Max Payne, Stronghold, …
Let's try Linux Games:
Frozen-Bubble, Jamestown… nothing.
Your method also doesn't give me any Keyboard input.

Keyboard works anywhere else. Also in ALL the games I tried when I start them no matter if directly or over the script I use from wahcade. But not if they are started from wahcade.
Keyboard workds in sdlmame though… Don't know why it doesn't anywhere else.

Mouse works fine but no keyboard input is accepted.

It worked at the last update. Maybe some config setting? I'll recompile wahcade.

[edit]
After recompiling: Keyboard works in linuxgames but not in wine. Maybe it needs some specific libraries?
[/edit]
the_gamer
 
Posts: 58
Joined: Wed May 04, 2011 8:45 pm

Re: Window Focus

Postby the_gamer » Wed Nov 12, 2014 8:12 pm

Sorry for the doublepost but I think this is important enough to have a post for itself:

I had to UNcheck "allow the windowmanager to control the windows" in winecfg. Runs again now. sairuk, thanks a lot for your time!
the_gamer
 
Posts: 58
Joined: Wed May 04, 2011 8:45 pm

Re: Window Focus

Postby sairuk » Wed Nov 12, 2014 9:52 pm

Happy you got it sorted out, I'll post that to the Wah!Ki under wine as a fix for no keyboard being forwarded. Thanks for the info.
mameau - My random bits | Wah!Ki - A Wah!Cade wiki | Mah!Cade - Experimental Wah!cade Branch | ListGen | Lazarus
User avatar
sairuk
 
Posts: 432
Joined: Sat May 22, 2010 12:37 am


Return to Wah!Cade

Who is online

Users browsing this forum: No registered users and 1 guest

cron