Page 2 of 2

Re:BlueIllusionOS 0.06 - Status Update & New Disk image

Posted: Sat Nov 12, 2005 8:07 pm
by Curufir
Pype.Clicker wrote: - hangman stalled qemu and now i have a non-moving mouse cursor on my X server >_<
Off-topic I know, but this also irritates the hell out of me (It happens on numerous SDL apps).

Code: Select all

/*
 * This program will unlock your pointer if it won't move anymore. This
 *  usually happens when a program crashes while the mouse was grabbed.
 *
 * Link with SDL.  (http://www.libsdl.org/)
 *
 *   gcc -o umouse umouse.c `sdl-config --cflags` `sdl-config --libs`
 *
 *  written by Ryan C. Gordon ([email protected])
 */

#include <stdio.h>
#include <stdlib.h>
#include "SDL.h"

void adjust_gamma(int argc, char **argv)
{
    int i;
    double gamma;

    for (i = 0; i < argc - 1; i++)
    {
        if (strcasecmp(argv[i], "--gamma") == 0)
        {
            gamma = atof(argv[i + 1]);
            if (gamma == 0.0)
                fprintf(stderr, "Cowardly refusing to set gamma to 0.0...\n");
            else
            {
                if (SDL_SetGamma(gamma,  gamma, gamma) == -1)
                    fprintf(stderr, "SDL_SetGamma() failed.\n");
            } // else
        } // if
    } // for
} // adjust_gamma


int main(int argc, char **argv)
{
    SDL_Event event;

    SDL_Init(SDL_INIT_VIDEO);
    SDL_SetVideoMode(640, 480, 16, 0);
    SDL_ShowCursor(0);
    SDL_WM_GrabInput(SDL_GRAB_ON);
    adjust_gamma(argc, argv);
    SDL_PumpEvents();
    SDL_WM_GrabInput(SDL_GRAB_OFF);
    SDL_ShowCursor(1);
    SDL_Quit();

    return(0);
} // main

// end of umouse.c ...
Make a hotkey to the resultant binary (I use the 'back' button on this internet keyboard). Saves screwing around trying to get the mouse back.

Re:BlueIllusionOS 0.06 - Status Update & New Disk image

Posted: Tue Nov 15, 2005 7:55 am
by distantvoices
Thanks for the testing, lads! I appreciate it.

@pype: which mode have you selected? It shouldn't wrap around, except of working settings which I haven't taken care of yet.

As of the Hangman thing: I'll check this. Thanks for pointing out. :-)

You can use the reset button in the login screen to erase the fields. I've not yet implemented backspace and erasing in single line edits.

stay safe.

Re:BlueIllusionOS 0.06 - Status Update & New Disk image

Posted: Fri Nov 18, 2005 2:02 am
by Pype.Clicker
i think it was 800x600 ... the bitdepth i'm unsure, but i think it was mode #1.