• Order of the Butterfly
    Order of the Butterfly
    BalrogSoft
    Posts: 171 from 2006/10/6
    From: Spain
    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 shell).



    It works on my Macmini system.

    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.

    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()? There aren't functions like glutLeaveMainLoop() or mglExit() implemented on TinyGL.

    Quote:

    Piru wrote:
    PS. Currently the app cannot be run safely from Ambient if compiled with NOSTARTUPFILES. For that to work you'd need to handle WBStartupMsg manually.


    Done, now it works properly with NOSTARTUPFILES defined.

    This is the last version, only 3795 bytes:
    Overw8-bits

    [ Edited by BalrogSoft 22.05.2014 - 17:44 ]
    Balrog Software - AmigaSkool.net
    Mac Mini - MorphOS 3.8 - G4 1.5Ghz - Ati 9200 64 Mb
    Efika - MorphOS 3.6 - Ati 9200 64Mb - 80 Gb HD
    Amiga 1200D - OS 3.9 - Blizzard 603e/240mh
  • »22.05.14 - 19:37
    Profile Visit Website