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
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
- RISC OS London Show Report 2024 (News:1)
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