Gamestudio Links
Zorro Links
Newest Posts
Old models with Mixamo animations
by rayp
Yesterday at 21:21
rayp's old school fast zombie FPS project
by rayp
Yesterday at 21:10
Votes for future features
by AndrewAMD
Yesterday at 18:08
Series within loop
by tradingest
Yesterday at 15:24
TMF info
by AndrewAMD
Yesterday at 15:24
text outline breiter machen?
by tagimbul
Yesterday at 12:26
Reset vars
by tradingest
Yesterday at 00:40
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
5 registered (Akow, RealSerious3D, AndrewAMD, thewalruss, 1 invisible), 442 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
jiffdbf, jgtrader, Chefmac, BazGen, pallab1964
18079 Registered Users
Topic Options
Rate This Topic
#472699 - 05/15/18 07:17 on_exit - Not calling if engine crashes.
EVO Offline
Junior Member

Registered: 02/09/13
Posts: 91
Loc: Maysville, Ga
I have important data that needs changed when my project exits. I'm currently dealing with the issue that if the project crashes, the on_exit function never gets called.

Is there a way to force the on_exit function if the project crashes?
_________________________
Evoeon.com - Evonet - Twitter


Top
#472702 - 05/15/18 10:58 Re: on_exit - Not calling if engine crashes. [Re: EVO]
txesmi Offline
Serious User

Registered: 06/13/07
Posts: 1164
Loc: Hiporope and its pain
Hi,
as far as I tested, the window callback function always receive the window destroying message.

Code:
LRESULT CALLBACK onMsgOld (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);

LRESULT CALLBACK myMsg (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
	if (message == WM_DESTROY) {
		// do whatwever you need at window destroying time
	}
	return onMsgOld(hwnd, message, wParam, lParam);   	  
}

void main () {
	onMsgOld = on_message;
	on_message = myMsg;
	...



Salud!

Top
#472714 - 05/15/18 19:02 Re: on_exit - Not calling if engine crashes. [Re: txesmi]
EVO Offline
Junior Member

Registered: 02/09/13
Posts: 91
Loc: Maysville, Ga
This works great.
Thanks Txesmi.
_________________________
Evoeon.com - Evonet - Twitter


Top
#472722 - 05/15/18 22:40 Re: on_exit - Not calling if engine crashes. [Re: EVO]
txesmi Offline
Serious User

Registered: 06/13/07
Posts: 1164
Loc: Hiporope and its pain
glag of been helpful

Top


Moderator:  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de