Author Topic: Retrofe 2nd, 3th, etc.. screen allways Fullscreen  (Read 4089 times)

RfsVieira

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +21/-0
    • View Profile
Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« on: March 11, 2022, 01:58:34 PM »
Wen testing retrofe, and it doesnt have nothing to do with layouts.

in settings.conf if you say fullscreen "no" for 1st screen and add vertical and horizontal valors it will read and aplly, for next screens 2nd in my case it will read settings rec to log but will not apply.
It will always assume fullscreen dont know with flags is aplaying if SDL_WINDOW_FULLSCREEN_DESKTOP our SDL_WINDOW_FULLSCREEN. but is applying my resolution.
for  what i see its an code issue problavly bcs it doesnt read (i++) for display(n) 2 my case, why i say code issue, because if i change line 193 -- windowWidth_, windowHeight_ to 1280, 720 it will assume for both screens the changes. ass prints i add for you see.
I add log for you understand what im telling.
i had more prints but it only allows 4 :(
Any think i can help testing be free ask.
Thanks again for your work.


Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #1 on: March 11, 2022, 03:30:22 PM »
Thanks. This appears to be a cross platform issue, but might also explain why some people with multiple windows using a single screen definition were having crash problems. I'll see if I can reproduce and debug the issue. Thanks again for the report.

RfsVieira

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +21/-0
    • View Profile
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #2 on: March 11, 2022, 04:35:08 PM »
Your code is all right for wht I see, and googling 😏 many ppl has problems trying do it for 2nd screen as it add the create window overwrite in one screen only,
In my opinion, as sdl scan how many displays are connected why not if possible script tht info to settings.conf? Our add an if display is == n then screen um can't be >n?
And get from start fullscreen no?
What I understand for issue is that it has some mess between display and screenum. Well probably I'm all wrong I'm only sharing my thoughts.
Well thanks for your time
Anything you need for test just fell free.
« Last Edit: March 11, 2022, 05:39:50 PM by RfsVieira »

RfsVieira

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +21/-0
    • View Profile
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #3 on: March 22, 2022, 10:26:55 PM »
hello, made some new tests if use
mirror1 = true   # true our false
rotation1 = 1    # 1= 90, 2 = 180  , 3 = 270

it will work on 2nd screen. Problem is  only the reported doesn't include this part of code.
thanks

RfsVieira

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +21/-0
    • View Profile
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #4 on: March 31, 2022, 12:56:55 AM »
Hello, new theory /  found the issue, make some testes here is a solution by hand not settings.conf file, for some reason it doesn't apply the info inside settings, but it reads as you can see in 1st log prints.

if in settings i say numScreens             = 1 i get tht 2  windows as print
if in settings i say numScreens             = 2 i get tht 2 windows + 2 ghost windows as bar prints
(i think this me missing some disable // to numscreens for not read settings)

i was wrong with the theory of display numb and scren numb....

i think for some reason it doesn't update  windowWidth_  windowHeight_, (i++, hstrin, vstrin our fullscreen = yes ??!!) it gets 1st info then  goes to full screen for next ones.

for tests i change line 193 add 194 to

window_[0] = SDL_CreateWindow( "RetroFE", SDL_WINDOWPOS_CENTERED_DISPLAY(0), SDL_WINDOWPOS_CENTERED_DISPLAY(0), 1280, 720, windowFlags );
window_[1] = SDL_CreateWindow( "RetroFE", SDL_WINDOWPOS_CENTERED_DISPLAY(1), SDL_WINDOWPOS_CENTERED_DISPLAY(1), 1280, 1024, windowFlags );

and change 211 add 212 to

renderer_[0] = SDL_CreateRenderer( window_[0], -1, SDL_RENDERER_ACCELERATED );
renderer_[1] = SDL_CreateRenderer( window_[1], -1, SDL_RENDERER_ACCELERATED );

As you can see from the prints it creates windows as ask with the asked size and center

Thanks
« Last Edit: March 31, 2022, 02:07:23 AM by RfsVieira »

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #5 on: March 31, 2022, 10:07:32 AM »
Thanks. I'll use this for a closer look at the code. Please, also consider just cloning my git archive, changing the code, and sending a pull request. I'll just review your code changes and accept them then.

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #6 on: April 03, 2022, 11:01:01 AM »
The email you sent me pointed out the source of the issue to me. The if conditions were incorrect. I've fixed them in github; let me know if that works for you or not (I don't have multiple screens to test it with).
-----
@@ -131,7 +131,7 @@ bool SDL::initialize( Configuration &config )
                 Logger::write( Logger::ZONE_ERROR, "Configuration", "Missing property \"horizontal\"" + std::to_string(i) );
                 return false;
             }
-            else if ( hString != "stretch" && (i == 0 && !config.getProperty( "horizontal", windowWidth_ )) && !config.getProperty( "horizontal" + std::to_string(i), windowWidth_ ))
+            else if ( hString != "stretch" && (i != 0 || !config.getProperty( "horizontal", windowWidth_ )) && !config.getProperty( "horizontal" + std::to_string(i), windowWidth_ ))
             {
                 Logger::write( Logger::ZONE_ERROR, "Configuration", "Invalid property value for \"horizontal\"" + std::to_string(i) );
                 return false;
@@ -148,7 +148,7 @@ bool SDL::initialize( Configuration &config )
                 Logger::write( Logger::ZONE_ERROR, "Configuration", "Missing property \"vertical\"" + std::to_string(i) );
                 return false;
             }
-            else if ( vString != "stretch" && (i == 0 && !config.getProperty( "vertical", windowHeight_ )) && !config.getProperty( "vertical" + std::to_string(i), windowHeight_ ) )
+            else if ( vString != "stretch" && (i != 0 || !config.getProperty( "vertical", windowHeight_ )) && !config.getProperty( "vertical" + std::to_string(i), windowHeight_ ) )
             {
                 Logger::write( Logger::ZONE_ERROR, "Configuration", "Invalid property value for \"vertical\"" + std::to_string(i) );
                 return false;
« Last Edit: April 03, 2022, 11:03:24 AM by Pieter Hulshoff »

RfsVieira

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +21/-0
    • View Profile
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #7 on: April 03, 2022, 11:05:26 AM »
Hello, the changes I made and pull request works for me.
Alredy tested, missing test if in settings is option stretch. Only tested add horizontal and vertical values, but if assume 1920 I think will assume stretch to.
https://github.com/phulshof/RetroFE/pulls
But if u found another way to fix wen I'm home I test it.
Thanks
« Last Edit: April 03, 2022, 11:13:13 AM by RfsVieira »

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #8 on: April 03, 2022, 11:12:50 AM »
I know, but your changes simply avoid the problem. As said: the condition was incorrect, but that conditional check is in there for a reason: to provide feedback in case parameters are incorrect or forgotten.

RfsVieira

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +21/-0
    • View Profile
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #9 on: April 03, 2022, 11:16:53 AM »
Oki, great you found it, I I wll be home in 11h I test in tht time, if some one outhere following tht can test pls help dev
Only saw your changes now 😅.  I'm working so read all diagonal 😢
Thanks for help
« Last Edit: April 03, 2022, 11:25:32 AM by RfsVieira »

RfsVieira

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +21/-0
    • View Profile
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #10 on: April 03, 2022, 10:00:06 PM »
hello,
its working, thanks

STAiNLESS

  • Newbie
  • *
  • Posts: 48
  • Karma: +49/-13
  • CORE
    • View Profile
Re: Retrofe 2nd, 3th, etc.. screen allways Fullscreen
« Reply #11 on: April 03, 2022, 10:52:21 PM »
great work guys.
now to invest in a marquee  :-*