It is currently Wed Jan 27, 2021 8:04 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: [5.72] OpenWindowedScreen() AutoStretch doesn't work anymore
PostPosted: Wed Jun 03, 2020 7:08 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 21, 2013 5:21 pm
Posts: 162
Location: France (Al's Nudie bar!)
Code:
#ScreenWidth   = 320
#ScreenHeight   = 256

Define.i MainWindow, ZoomFactor
Define.b quit
Define.i event

Procedure Error(message.s)
   MessageRequester("Error", message, #PB_MessageRequester_Ok|#PB_MessageRequester_Error)
   End 1
EndProcedure

If InitKeyboard()=0 Or InitSprite()=0
    Error("Initialization failed !")
EndIf

ZoomFactor=2

MainWindow=OpenWindow(#PB_Any,0,0, #ScreenWidth*ZoomFactor,#ScreenHeight*ZoomFactor,"",#PB_Window_SystemMenu | #PB_Window_ScreenCentered)

If MainWindow=0 Or OpenWindowedScreen(WindowID(MainWindow),0,0,#ScreenWidth,#ScreenHeight,#True,0,0)=0
   Error("Couldn't open the screen !")
EndIf

quit=#False

Repeat
   
   Repeat
      event=WindowEvent()
      If event=#PB_Event_CloseWindow
         quit=#True
      EndIf
   Until event=0
   
   ExamineKeyboard()
   
   If KeyboardPushed(#PB_Key_Escape)
      quit=#True
   EndIf
   
   ClearScreen(0)
   
   FlipBuffers()
   
Until quit

_________________
http://majikeyric.free.fr/


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.72] OpenWindowedScreen() AutoStretch doesn't work any
PostPosted: Wed Jun 03, 2020 7:51 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 8:51 am
Posts: 1486
Location: Germany
look at this snippet:
Code:
OpenWindow(0,0,0,0,0,"",#PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,#ScreenWidth,#ScreenHeight,#True,0,0)
ResizeWindow(0,0,0,#ScreenWidth*ZoomFactor,#ScreenHeight*ZoomFactor)

_________________
Belive!
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.72] OpenWindowedScreen() AutoStretch doesn't work any
PostPosted: Wed Jun 03, 2020 2:04 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 21, 2013 5:21 pm
Posts: 162
Location: France (Al's Nudie bar!)
Thanks for the workaround :mrgreen:

_________________
http://majikeyric.free.fr/


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.72] OpenWindowedScreen() AutoStretch doesn't work any
PostPosted: Mon Sep 28, 2020 6:46 pm 
Offline
User
User

Joined: Fri Mar 11, 2005 6:24 pm
Posts: 53
Location: Toronto
Confirmed. Just ran into this issue on both x86 and x64. I also noticed that with a resizable window if you grab the edge and change the size of the window auto stretch kicks in...hence IceSoft's workaround works.


Last edited by Krix on Tue Oct 27, 2020 10:49 am, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [5.72] OpenWindowedScreen() AutoStretch doesn't work any
PostPosted: Tue Oct 20, 2020 9:07 am 
Offline
User
User

Joined: Fri Mar 11, 2005 6:24 pm
Posts: 53
Location: Toronto
Still doesn't work with 5.73 Beta 2 x86/x64.


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.72] OpenWindowedScreen() AutoStretch doesn't work any
PostPosted: Fri Oct 30, 2020 3:03 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14181
Location: France
Please don't bump the topics, we are aware of it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye