forked from len0rd/rockbox
This enables smooth resizing of the window using a fixed aspect ratio, instead of snapping into the correct aspect ratio only when the resize operation has finished, by using an SDL event filter that gets events delivered during the resize operation (whereas SDL_PollEvent blocks until done on macOS). Change-Id: Ie6614e4b6f49a24469c5ee6a69721c9fbd440dae
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
/***************************************************************************
|
|
* __________ __ ___.
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
* \/ \/ \/ \/ \/
|
|
* $Id$
|
|
*
|
|
* Copyright (C) 2009 by Thomas Martitz
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
* KIND, either express or implied.
|
|
*
|
|
****************************************************************************/
|
|
|
|
|
|
#ifndef __BUTTON_SDL_H__
|
|
#define __BUTTON_SDL_H__
|
|
|
|
#include <stdbool.h>
|
|
#include "config.h"
|
|
#include "SDL.h"
|
|
|
|
extern int sdl_app_has_input_focus;
|
|
|
|
#ifdef __APPLE__
|
|
int sdl_event_filter(void *userdata, SDL_Event * event);
|
|
#endif
|
|
|
|
bool button_hold(void);
|
|
#undef button_init_device
|
|
void button_init_device(void);
|
|
#ifdef HAVE_BUTTON_DATA
|
|
int button_read_device(int *data);
|
|
#else
|
|
int button_read_device(void);
|
|
#endif
|
|
|
|
#endif /* __BUTTON_SDL_H__ */
|