rem: if (code == glgfx_input_q) uae_quit();
context: void handle_events (void){  enum glgfx_input_code code;  //  printf("handle_events()\n");  gui_handle_events ();  while ((code = glgfx_input_getcode()) != glgfx_input_none) {    switch (code & glgfx_input_typemask) {      case glgfx_input_key: {	int down = (code & glgfx_input_releasemask) == 0;	int key = code & glgfx_input_valuemask;	int ievent;	if ((ievent = match_hotkey_sequence(key, down))) {	  handle_hotkey_event(ievent, down);	} else {	  inputdevice_do_keyboard(code, down);	}	if (code == glgfx_input_q) uae_quit();	break;      }	        case glgfx_input_mouse_xyz: {	int rel_x = (int) (char) (((code & glgfx_input_valuemask) >> 0) & 0xff);	int rel_y = (int) (char) (((code & glgfx_input_valuemask) >> 8) & 0xff);	setmousestate(0, 0, rel_x, 0);	setmousestate(0, 1, rel_y, 0);	break;      }      case glgfx_input_mouse_button: {	int down = (code & glgfx_input_releasemask) == 0;	int button = code & glgfx_input_valuemask;	setmousebuttonstate(0, button, down);	break;      }      case glgfx_input_mouse_vwheel:      case  glgfx_input_mouse_hwheel:	break;      default:	write_log("gfx-glgfx: Unknown input event %ld\n", code);	break;    }  }}