• MorphOS Developer
    Piru
    Posts: 582 from 2003/2/24
    From: finland, the l...
    Quote:

    BalrogSoft wrote:
    Quote:

    Piru wrote:
    That won't work correctly I'm afraid (it will nuke the shell when started from it, and leak WBStartupMsg if ran from ambient).



    It works on my Macmini system.

    Trust me, it doesn't work correctly.


    Quote:

    Quote:

    Piru wrote:
    This should do the trick however:

    1. Only check for ESC in keys function. If it is found signal self with CTRL-C signal, telling glutMainLoop that the app is terminating:

    Code:

    static void keys(unsigned char c, int x, int y)
    {
    if (c == 0x1b)
    {
    Signal(FindTask(0), SIGBREAKF_CTRL_C);
    }
    }




    Unfortunately, It doesn't work, I tried it before. I can't exit pressing CTRL+C shortcut, and I can't exit sending a SIGBREAKF_CTRL_C signal.

    Indeed, you're right. I missed that it doesn't work if idlefunc is specified. I'll fix this for future versions.

    Quote:

    I'm not aware about last changes on TinyGL, and MorphOS SDK doesn't contain any documentation about TinyGL, but whats the proper way to exit from glutMainLoop()?

    Unfortunately in the current version there is no way other than hitting the window close gadget or calling exit() or longjmp().
  • »22.05.14 - 20:36
    Profile