Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by Emre
Today at 01:03
New Zorro version 1.83
by claudio
Yesterday at 17:22
Ahead bias when retrain
by jcl
Yesterday at 12:27
Huge array for Deep Learning
by jcl
Yesterday at 12:06
[LBGUI] Memory not released!
by EVO
05/23/18 22:39
http_post undeclared identifier
by Superku
05/23/18 22:10
Pan/Tilt in relation to entity?
by Superku
05/23/18 20:59
AUM Magazine
Latest Screens
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Triton Wing now available on Steam
Who's Online
10 registered (Slin, Quad, Superku, AndrewAMD, 3run, jyd, mk_1, 3 invisible), 460 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Rayharry, AgentShark, rpauletto, tuuPaul, LaserJock2000
17960 Registered Users
Topic Options
Rate This Topic
#472699 - 05/15/18 07:17 on_exit - Not calling if engine crashes.
EVO Online
Junior Member

Registered: 02/09/13
Posts: 82
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: 1120
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 Online
Junior Member

Registered: 02/09/13
Posts: 82
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: 1120
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