Hi all
As the topic name says, the gamepad doesn't seem to be working when ZSNES is out of focus, even though it says in emu notes that:
"* You can now use gamepad in the background without ZSNES having focus. [pagefault]"
When I saw these notes I was so happy, I could finaly use ZSNES with Dual View TV-Out Mode but was allmost hearthbroken to find out that this doesn't seem to be working.
So my question now is, is this a bug or is there a way to turn this feature on in the emu...?
I love ZSNES and would love to be able to run it in Dual View Mode, I can run Snes9x just fine in Dual View since it has the out of focus support thing, but 9x just isn't on the same quality level as ZSNES.
Thank you! ( in advance )
Gamepad not working when ZSNES is out of focus! [SOLVED]
Moderator: ZSNES Mods
-
- New Member
- Posts: 3
- Joined: Fri Mar 21, 2008 8:49 am
Gamepad not working when ZSNES is out of focus! [SOLVED]
Last edited by FenixThe3rd on Sat Apr 12, 2008 7:58 am, edited 1 time in total.
-
- New Member
- Posts: 3
- Joined: Fri Mar 21, 2008 8:49 am
Just a small update on this matter.
Yesterday I asked my brother who happens to be a programer to take a look at this problem, and it took him less then a minute to enable the Out of Focus function!!
Seems one only needs to modify a few lines in the code to enable this.
Good thing that ZSNES is open source ey ^ ^
Yesterday I asked my brother who happens to be a programer to take a look at this problem, and it took him less then a minute to enable the Out of Focus function!!
Seems one only needs to modify a few lines in the code to enable this.
Good thing that ZSNES is open source ey ^ ^
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
-
- New Member
- Posts: 3
- Joined: Fri Mar 21, 2008 8:49 am
I've been somewhat bizzy these last few weeks, so it totally slipped my mind to actually post the modification
My bro has compiled the modified code for those that don't like to mess around with sourcecode stuff.
Click here to download
PS: he didn't like the scanlines in the NTSC Filter and the fact that one needs to mess around with resolutions just to make them "almost" display corectly so he disabled them.
Anyways here's the code part:
Out of Focus:
In the file: src/win/winlink.cpp change:
to:
NTSC Filter Scanlines Disabled:
In the file: src/video/ntsc.c change:
to:
My bro has compiled the modified code for those that don't like to mess around with sourcecode stuff.
Click here to download
PS: he didn't like the scanlines in the NTSC Filter and the fact that one needs to mess around with resolutions just to make them "almost" display corectly so he disabled them.
Anyways here's the code part:
Out of Focus:
In the file: src/win/winlink.cpp change:
Code: Select all
BOOL InputDeAcquire(void)
{
if (KeyboardInput) KeyboardInput->Unacquire();
if (JoystickInput[0]) JoystickInput[0]->Unacquire();
if (JoystickInput[1]) JoystickInput[1]->Unacquire();
if (JoystickInput[2]) JoystickInput[2]->Unacquire();
if (JoystickInput[3]) JoystickInput[3]->Unacquire();
if (JoystickInput[4]) JoystickInput[4]->Unacquire();
if (device1 && device2 && !GUIOn2) MultiMouseShutdown();
else if (MouseInput) MouseInput->Unacquire();
InputEn = 0;
return TRUE;
}
Code: Select all
BOOL InputDeAcquire(void)
{
if (KeyboardInput) KeyboardInput->Unacquire();
if (JoystickInput[0]) JoystickInput[0]->Acquire();
if (JoystickInput[1]) JoystickInput[1]->Acquire();
if (JoystickInput[2]) JoystickInput[2]->Acquire();
if (JoystickInput[3]) JoystickInput[3]->Acquire();
if (JoystickInput[4]) JoystickInput[4]->Acquire();
if (device1 && device2 && !GUIOn2) MultiMouseShutdown();
else if (MouseInput) MouseInput->Unacquire();
InputEn = 1;
return TRUE;
}
In the file: src/video/ntsc.c change:
Code: Select all
/* output second scanline darkened by 25% */
#define PIXEL_OUT( x )\
{\
unsigned pixel;\
SNES_NTSC_RGB_OUT( x, pixel, 16 );\
line_out [x] = pixel;\
line_out2 [x] = pixel - (pixel >> 2 & 0x39E7);\
}
Code: Select all
/* output second scanline darkened by 25% */
#define PIXEL_OUT( x )\
{\
unsigned pixel;\
SNES_NTSC_RGB_OUT( x, pixel, 16 );\
line_out [x] = pixel;\
line_out2 [x] = pixel;\
}
Last edited by FenixThe3rd on Sat Apr 12, 2008 8:05 am, edited 1 time in total.
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
-
- ZSNES Developer
- Posts: 6747
- Joined: Tue Dec 28, 2004 6:47 am
-
- New Member
- Posts: 2
- Joined: Mon Sep 27, 2010 4:30 pm
Re: Gamepad not working when ZSNES is out of focus! [SOLVED]
I have a dual monitor setup and it'd be really great if I could get this working.
The problem is that I have no idea how to compile code or do all that technical stuff. (I tried but I am seriously am out of my depth unfortunately.)
Does anyone have a copy of ZSNES the out of focus code fixed? Care to share?
Or at least could anyone tell me where to begin on compiling the source code after the lines have been changed?
Thanks for your help.
The problem is that I have no idea how to compile code or do all that technical stuff. (I tried but I am seriously am out of my depth unfortunately.)
Does anyone have a copy of ZSNES the out of focus code fixed? Care to share?
Or at least could anyone tell me where to begin on compiling the source code after the lines have been changed?
Thanks for your help.
-
- New Member
- Posts: 2
- Joined: Mon Sep 27, 2010 4:30 pm
Re: Gamepad not working when ZSNES is out of focus! [SOLVED]
Still hoping to have some sort of word on this.