Hi,
Sorry to jump in so late, but couldn't you just run your game app again ?
Split your app into 2, one for the menus, one for the game, and to restart
you can have the game spawn the game again and then exit. ( Maybe has a
sleep call at the start just to make sure your other game instance is dead )
> -----Original Message-----
> From: Corrinne Yu [mailto:cor...@sp...]
> Sent: 10 January 2002 17:50
> To: Gam...@li...
> Subject: RE: [GD-General] longjmp for C++
>
>
>
> -----Original Message-----
> From: gam...@li...
> [mailto:gam...@li...] On Behalf Of
> Matt Davies
> Sent: Thursday, January 10, 2002 6:24 AM
> To: cor...@sp...; Gam...@li...
> Subject: RE: [GD-General] longjmp for C++
>
> Under Windows, you can use the API calls HeapCreate, HeapDestroy,
> HeapAlloc
>
> -- We do our own heaps so it is even easier. :) Doing our own
> memory is
> also better for cross platform reasons.
>
> As for DirectX, shutting it down should clear all resources associated
> with
> a device driver, shouldn't it?
>
> -- :D Ha! (To be fair it does a good job of cleaning as much
> as it can.)
>
> -- Actually, it is still important for you to manually clean
> and release
> your resources before shutting down the device. In execution, various
> minor undesirable things happen if your own code does not clean it all
> up before shutting down devices.
>
> -- Another thing is that strangely enough things like destroying the
> entire device in DX is an asynchronous operation, when it would make
> sense for that to be synchronous, or a flag to define it to be
> synchronous. Or even better, it would be good to also have a global
> TestDeviceState to check its destruction process in this
> case, as you no
> longer have the object (pointer), but you know for a split
> nanosecond or
> so after destruction, DX is still out there doing something.
>
> -- Thus if you actually leave resource releasing to Direct X during
> shutdown, or if you have a huge number of resources that is of the
> managed pool (which DX allocates system copies that it needs
> to clean),
> there can be an unknowable time lapse after you called
> destruction, and
> then when it is all actually destroyed.
>
> HANDLE Spawn (const char* commandLine, const char* params,
> const char* directory)
>
> -- Thanks, though the "specifiable pristine state" (not a real reboot)
> is what we are looking for (very close to longjump). We don't
> necessarily want to actually reboot, but jump to a precise
> state that we
> set somewhere in the game execution (which is in fact way after the
> process reboot).
>
> -- The question is really more out of curiosity. Release and Restore
> works just fine and probably would remain the solution.
>
> P.S. The platform specific-ness of this is making this veering off of
> the "General" Topic, so perhaps we should move it elsewhere
> where it is
> more specific to the API's and platforms.
>
>
>
> _______________________________________________
> Gamedevlists-general mailing list
> Gam...@li...
> https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
>
|