use hgw_context_destroy with HGW_BYE_INACTIVE to indicate game is closed
[mancala] / src / callbacks.c
index 0b0e6cf..cbfe07d 100644 (file)
 
 // Pause the game
 int exit_callback(int errcode) {
-    printf("exit_callback called...\n");
+       printf("exit_callback called...\n");
+       hgw_context_destroy(hgw_context, HGW_BYE_INACTIVE);
        return 0;
 }
 
 // Quit game
 int quit_callback(int errcode) {
-    printf("quit_callback called...\n");
-       hgw_context_compat_destroy_quit(hgw_context);
+       printf("quit_callback called...\n");
+       hgw_context_destroy(hgw_context, HGW_BYE_INACTIVE);
        return 0;
 }
 
 int flush_callback(int errcode) {
-    printf("quit_callback called...\n");
+       printf("quit_callback called...\n");
+       hgw_context_destroy(hgw_context, HGW_BYE_INACTIVE);
        return 0;
 }