log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Git client updated to 0.07 (News:1)
- Archive Edition 27:1 reviewed (News:)
- Rougol April 2024 meeting on monday is Anniversary time (News:1)
- WROCC April 2024 meeting o...changes to our phone lines (News:1)
- April developer 'fireside' chat is on saturday night (News:)
- March 2024 News Summary (News:4)
- WROCC Newsletter Volume 41:11 reviewed (News:)
- WROCC March 2024 meeting o... Hughes and Peter Richmond (News:1)
- Rougol March 2024 meeting on monday with Bernard Boase (News:)
- Drag'n'Drop 13i2 edition reviewed (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Returning from full screen mode
 
  Returning from full screen mode
  MrTAToad (13:22 10/2/2013)
  swirlythingy (18:13 10/2/2013)
    MrTAToad (22:36 10/2/2013)
      swirlythingy (23:56 10/2/2013)
        MrTAToad (11:11 12/2/2013)
 
Nicholas Kingsley Message #121889, posted by MrTAToad at 13:22, 10/2/2013
Member
Posts: 36
In my routine at start I store the current screen resolution mode (old stylee or new type) which is then used by the code to supposedly revert back to the correct mode when the program ends (using Wimp_SetMode). However, I find that often the program (or system) hangs with just the mouse pointer visible.
  ^[ Log in to reply ]
 
Martin Bazley Message #121890, posted by swirlythingy at 18:13, 10/2/2013, in reply to message #121889

Posts: 460
Is that necessary? If you don't call Wimp_Initialise, then I think the Wimp will buffer the current state of the screen, including mode, and restore it all for you when you 'press SPACE or click mouse to continue'.

And I'm pretty sure that Wimp_SetMode is what you call to change the desktop's screen mode, and I'm not certain what happens if you call it outside the Wimp. Wouldn't OS_ScreenMode 0 be a better bet?

Also, are you using double-buffering? That's a whole extra set of complications.
  ^[ Log in to reply ]
 
Nicholas Kingsley Message #121891, posted by MrTAToad at 22:36, 10/2/2013, in reply to message #121890
Member
Posts: 36
Yes, double buffering is used.

If the WIMP does restore the desktop properly then a manual restore wont be needed - will have to try that.
  ^[ Log in to reply ]
 
Martin Bazley Message #121892, posted by swirlythingy at 23:56, 10/2/2013, in reply to message #121891

Posts: 460
Double buffering is evil. See this thread.

I initially tried to store the desktop screen mode and attempt to switch back, but I later found out how to do it properly. I advise you examine the code used in the current release of Magic Mushrooms. That also shows you how to force the OS to allocate enough memory for two screen buffers, which is harder than it sounds. Without sufficient memory, requests to switch to the second screen bank will simply be ignored.
  ^[ Log in to reply ]
 
Nicholas Kingsley Message #121900, posted by MrTAToad at 11:11, 12/2/2013, in reply to message #121892
Member
Posts: 36
Thanks for that.

I need to look and see why the system is hanging on program end first - I remove the Wimp call, so it must be something in my destructors...
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Returning from full screen mode