SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Help

Reply
 
Thread Tools Search this Thread
Old 4 Weeks Ago   #1
a7xjeff
Default Focus lost

Hello sonic community. I am a console gamer mostly but wanted a sonic game to play with my kids and found this gem (emerald?lol). All the work that was and still is being put into this blew me away. So I've found out how to host and have 3 screens going on my laptop and the only thing that bugs me is that 2 of the screens have the "focus lost" message on them. Is there any way possible to remove this? Thanks in advance and to all those that make this game so awesome.
a7xjeff is offline   Reply With Quote
Old 4 Weeks Ago   #2
Rumia1
Backseat Developer
 
Rumia1's Avatar
Default

Sadly, you can not host 3 games with seperate instances on the same machine unless you find a way to somehow keep all three instances active. There's 2 player local splitscreen, and if you had a couple cheaper machines you could probably host a LAN game between the 3, but otherwise you're kinda out of luck for the moment.

It was at one point possible to host a netplay game or join one and then activate splitscreen mode with a console command, which would cut down the requirements to two machines, but that feature was removed due to supposed lack of use.
__________________
Quote:
Originally Posted by Cirno
Egguman-senpai...
Rumia1 is offline   Reply With Quote
Old 4 Weeks Ago   #3
a7xjeff
Default

I have it working now. We can all play it's just 2 of the screens are kind of blocked by that silly message. I have even seen where it was put in the code (I think that's what is called). I just don't know if it's possible to alter.
// platform independant focus loss
UINT8 window_notinfocus = false;
//
// DEMO LOOP
//
@@ -437,6 +440,17 @@ static void D_Display(void)
CON_Drawer();
M_Drawer(); // menu is drawn even on top of everything
// focus lost notification goes on top of everything, even the former everything
if (window_notinfocus)
{
M_DrawTextBox((BASEVIDWIDTH/2) - (60), (BASEVIDHEIGHT/2) - (16), 13, 2);
if (gamestate == GS_LEVEL && (P_AutoPause() || paused))
V_DrawCenteredString(BASEVIDWIDTH/2, (BASEVIDHEIGHT/2) - (4), V_YELLOWMAP, "Game Paused");
else
V_DrawCenteredString(BASEVIDWIDTH/2, (BASEVIDHEIGHT/2) - (4), V_YELLOWMAP, "Focus Lost");
}
Is there a way to cut this part out or at least the part that I assume is the culprit?
a7xjeff is offline   Reply With Quote
Old 4 Weeks Ago   #4
Monster psychic cat
Default

What'd you want to disable are those lines in sdl\i_video.c.

Code:
else if (!mousefocus && !kbfocus)
{
	// Tell game we lost focus, pause music
	window_notinfocus = true;
	I_PauseSong(0);

	if (!disable_mouse)
	{
		SDLforceUngrabMouse();
	}
	memset(gamekeydown, 0, NUMKEYS); // TODO this is a scary memset

	if (MOUSE_MENU)
	{
		SDLdoUngrabMouse();
	}
}
Monster psychic cat is offline   Reply With Quote
Old 4 Weeks Ago   #5
a7xjeff
Default

I apologize for my noobiness, but I don't have a clue on where to find this. Which file would I need to open and is plain notepad good enough to do the job?
a7xjeff is offline   Reply With Quote
Old 4 Weeks Ago   #6
Monster psychic cat
Default

So is your compile target SDL2? You can find the i_video.c file in the sdl subfolder inside the src folder. I don't recommend Windows' NotePad because it might ignore line breaks in those files.
Monster psychic cat is offline   Reply With Quote
Old 4 Weeks Ago   #7
a7xjeff
Default I'm an idiot. lol

So I got home from work and messed with it and realized i can move the characters on the screens with "no focus" but the buttons for jump and spin don't work. So monster cat I you knew what I wanted still. I now realize I need a way to keep all 3 windows "active" and not the "no focus dumbness". I can do it on N64 emulaters so i assume there is a way to do it on srb2. If anyone can help I'd appreciate it and my son would love you. lol thanks for your help monster cat and i hope you can help even more. btw i don't even know how to begin to respond to your answer because im program illiterate. lol Hopefully someone can explain it to me.. thanks again
a7xjeff is offline   Reply With Quote
Old 4 Weeks Ago   #8
a7xjeff
Default

Hey monster cat, or anyone else or can help, Ive spent a few hours trying to figure out what monster cat told me to do. I realized I didn't know what he was talking about because when I downloaded srb2 I didn't get the source code with it. Im downloading it now. So can I edit the stuff in the ivideo he told me about and then it fixes my game. Or do I have to recompile that after im done editing. I think I've downloaded everything I need but this is my first time doing this kinda thing and any advice would be helpful. (Im a console gamer usually so all of this is way new to me.)

---------- Post added at 09:24 AM ---------- Previous post was at 09:20 AM ----------

last time I spam til I get a response: I was happy with myself to learn how to edit and recompile and I got that silly message off of the other windows. :D but the real problem is that I need to keep all 3 windows "focused" so I can use 3 controllers. its silly that the analog sticks will work on the 2 other screens so they can move but no buttons work so no jumping or spinning. All I ask is if this is possible would someone show me said code and then tell me what to edit to make it work. Thanks for reading my rambling and hope someone can help me share this awesome game with my kids.

Last edited by a7xjeff; 4 Weeks Ago at 10:13 AM.
a7xjeff is offline   Reply With Quote
Old 4 Weeks Ago   #9
Ice
Pretty chill guy
 
Ice's Avatar
Default

Hi Jeff, I have no idea how to fix it but I do think you might find more active help on the Discord channel here: https://mb.srb2.org/showthread.php?t=42963

On the MB you might get 1 or 2 replies per day if you're lucky, but on the channel there's usually someone helpful around.
__________________
Endless Mine - Piano Cover (First one on youtube!)
http://www.youtube.com/watch?v=2m8LvQL0Akc
Ice is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:24 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.