Compare commits
	
		
			2 Commits
		
	
	
		
			pull-audio
			...
			pull-ui-20
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					56bdd4b69a | ||
| 
						 | 
					919e11f373 | 
@@ -21,7 +21,6 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include <alsa/asoundlib.h>
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
#include "qemu/main-loop.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "audio.h"
 | 
			
		||||
#include "monitor/monitor.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,3 @@
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
#include "audio.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,5 @@
 | 
			
		||||
/* public domain */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
 | 
			
		||||
#define AUDIO_CAP "win-int"
 | 
			
		||||
 
 | 
			
		||||
@@ -22,8 +22,8 @@
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include <CoreAudio/CoreAudio.h>
 | 
			
		||||
#include <string.h>             /* strerror */
 | 
			
		||||
#include <pthread.h>            /* pthread_X */
 | 
			
		||||
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,6 @@
 | 
			
		||||
 * SEAL 1.07 by Carlos 'pel' Hasan was used as documentation
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
#include "audio.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,6 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
#include "audio.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
#include "audio.h"
 | 
			
		||||
#include "qemu/timer.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -21,8 +21,9 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <sys/mman.h>
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#include <sys/ioctl.h>
 | 
			
		||||
#include <sys/soundcard.h>
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,4 @@
 | 
			
		||||
/* public domain */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
#include "audio.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include <SDL.h>
 | 
			
		||||
#include <SDL_thread.h>
 | 
			
		||||
#include "qemu-common.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,6 @@
 | 
			
		||||
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "qemu/error-report.h"
 | 
			
		||||
#include "qemu/timer.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "qemu/timer.h"
 | 
			
		||||
#include "audio.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,3 @@
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "monitor/monitor.h"
 | 
			
		||||
#include "qemu/error-report.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,6 @@
 | 
			
		||||
 * GNU GPL, version 2 or (at your option) any later version.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/audio/audio.h"
 | 
			
		||||
#include "audio/audio.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,6 @@
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/audio/audio.h"
 | 
			
		||||
#include "audio/audio.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,6 @@
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/sysbus.h"
 | 
			
		||||
#include "trace.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/audio/audio.h"
 | 
			
		||||
#include "audio/audio.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,6 @@
 | 
			
		||||
/* #define VERBOSE_ES1370 */
 | 
			
		||||
#define SILENT_ES1370
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/audio/audio.h"
 | 
			
		||||
#include "audio/audio.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,10 @@
 | 
			
		||||
 | 
			
		||||
#define HAS_YM3812	1
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
//#include "driver.h"		/* use M.A.M.E. */
 | 
			
		||||
#include "fmopl.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/audio/audio.h"
 | 
			
		||||
#include "audio/audio.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,6 @@
 | 
			
		||||
 * TODO: check mixer: see 7.20 of sdk for panning pos (applies to all gus models?)?
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "gustate.h"
 | 
			
		||||
#include "gusemu.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,6 @@
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "gusemu.h"
 | 
			
		||||
#include "gustate.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,6 @@
 | 
			
		||||
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/pci/pci.h"
 | 
			
		||||
#include "intel-hda.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,6 @@
 | 
			
		||||
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/pci/pci.h"
 | 
			
		||||
#include "hw/pci/msi.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,6 @@
 | 
			
		||||
 * It supports only one playback voice and no record voice.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "audio/audio.h"
 | 
			
		||||
#include "lm4549.h"
 | 
			
		||||
@@ -34,6 +33,7 @@ do { printf("lm4549: " fmt , ## __VA_ARGS__); } while (0)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(LM4549_DUMP_DAC_INPUT)
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
static FILE *fp_dac_input;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,6 @@
 | 
			
		||||
 * Contributions after 2012-01-13 are licensed under the terms of the
 | 
			
		||||
 * GNU GPL, version 2 or (at your option) any later version.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/sysbus.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/i2c/i2c.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@
 | 
			
		||||
 *   http://www.milkymist.org/socdoc/ac97.pdf
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/sysbus.h"
 | 
			
		||||
#include "trace.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,6 @@
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/i386/pc.h"
 | 
			
		||||
#include "hw/isa/isa.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,6 @@
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/sysbus.h"
 | 
			
		||||
 | 
			
		||||
#include "pl041.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,6 @@
 | 
			
		||||
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 | 
			
		||||
 * THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/audio/audio.h"
 | 
			
		||||
#include "audio/audio.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,6 @@
 | 
			
		||||
 * This file is licensed under GNU GPL.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "qemu/osdep.h"
 | 
			
		||||
#include "hw/hw.h"
 | 
			
		||||
#include "hw/i2c/i2c.h"
 | 
			
		||||
#include "audio/audio.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@ struct sdl2_console {
 | 
			
		||||
    int hidden;
 | 
			
		||||
    int opengl;
 | 
			
		||||
    int updates;
 | 
			
		||||
    int idle_counter;
 | 
			
		||||
    SDL_GLContext winctx;
 | 
			
		||||
#ifdef CONFIG_OPENGL
 | 
			
		||||
    ConsoleGLState *gls;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								ui/gtk.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								ui/gtk.c
									
									
									
									
									
								
							@@ -1598,11 +1598,16 @@ static void gd_vc_chr_set_echo(CharDriverState *chr, bool echo)
 | 
			
		||||
static int nb_vcs;
 | 
			
		||||
static CharDriverState *vcs[MAX_VCS];
 | 
			
		||||
 | 
			
		||||
static CharDriverState *gd_vc_handler(ChardevVC *unused, Error **errp)
 | 
			
		||||
static CharDriverState *gd_vc_handler(ChardevVC *vc, Error **errp)
 | 
			
		||||
{
 | 
			
		||||
    ChardevCommon *common = qapi_ChardevVC_base(vc);
 | 
			
		||||
    CharDriverState *chr;
 | 
			
		||||
 | 
			
		||||
    chr = g_malloc0(sizeof(*chr));
 | 
			
		||||
    chr = qemu_chr_alloc(common, errp);
 | 
			
		||||
    if (!chr) {
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    chr->chr_write = gd_vc_chr_write;
 | 
			
		||||
    chr->chr_set_echo = gd_vc_chr_set_echo;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								ui/sdl.c
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								ui/sdl.c
									
									
									
									
									
								
							@@ -60,6 +60,11 @@ static SDL_Cursor *guest_sprite = NULL;
 | 
			
		||||
static SDL_PixelFormat host_format;
 | 
			
		||||
static int scaling_active = 0;
 | 
			
		||||
static Notifier mouse_mode_notifier;
 | 
			
		||||
static int idle_counter;
 | 
			
		||||
 | 
			
		||||
#define SDL_REFRESH_INTERVAL_BUSY 10
 | 
			
		||||
#define SDL_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
 | 
			
		||||
                            / SDL_REFRESH_INTERVAL_BUSY + 1)
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
#define DEBUG_SDL
 | 
			
		||||
@@ -802,6 +807,7 @@ static void handle_activation(SDL_Event *ev)
 | 
			
		||||
static void sdl_refresh(DisplayChangeListener *dcl)
 | 
			
		||||
{
 | 
			
		||||
    SDL_Event ev1, *ev = &ev1;
 | 
			
		||||
    int idle = 1;
 | 
			
		||||
 | 
			
		||||
    if (last_vm_running != runstate_is_running()) {
 | 
			
		||||
        last_vm_running = runstate_is_running();
 | 
			
		||||
@@ -817,9 +823,11 @@ static void sdl_refresh(DisplayChangeListener *dcl)
 | 
			
		||||
            sdl_update(dcl, 0, 0, real_screen->w, real_screen->h);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_KEYDOWN:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_keydown(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_KEYUP:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_keyup(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_QUIT:
 | 
			
		||||
@@ -829,10 +837,12 @@ static void sdl_refresh(DisplayChangeListener *dcl)
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_MOUSEMOTION:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_mousemotion(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_MOUSEBUTTONDOWN:
 | 
			
		||||
        case SDL_MOUSEBUTTONUP:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_mousebutton(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_ACTIVEEVENT:
 | 
			
		||||
@@ -847,6 +857,18 @@ static void sdl_refresh(DisplayChangeListener *dcl)
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (idle) {
 | 
			
		||||
        if (idle_counter < SDL_MAX_IDLE_COUNT) {
 | 
			
		||||
            idle_counter++;
 | 
			
		||||
            if (idle_counter >= SDL_MAX_IDLE_COUNT) {
 | 
			
		||||
                dcl->update_interval = GUI_REFRESH_INTERVAL_DEFAULT;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    } else {
 | 
			
		||||
        idle_counter = 0;
 | 
			
		||||
        dcl->update_interval = SDL_REFRESH_INTERVAL_BUSY;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void sdl_mouse_warp(DisplayChangeListener *dcl,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										23
									
								
								ui/sdl2.c
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								ui/sdl2.c
									
									
									
									
									
								
							@@ -49,6 +49,10 @@ static int guest_x, guest_y;
 | 
			
		||||
static SDL_Cursor *guest_sprite;
 | 
			
		||||
static Notifier mouse_mode_notifier;
 | 
			
		||||
 | 
			
		||||
#define SDL2_REFRESH_INTERVAL_BUSY 10
 | 
			
		||||
#define SDL2_MAX_IDLE_COUNT (2 * GUI_REFRESH_INTERVAL_DEFAULT \
 | 
			
		||||
                             / SDL2_REFRESH_INTERVAL_BUSY + 1)
 | 
			
		||||
 | 
			
		||||
static void sdl_update_caption(struct sdl2_console *scon);
 | 
			
		||||
 | 
			
		||||
static struct sdl2_console *get_scon_from_window(uint32_t window_id)
 | 
			
		||||
@@ -578,6 +582,7 @@ static void handle_windowevent(SDL_Event *ev)
 | 
			
		||||
void sdl2_poll_events(struct sdl2_console *scon)
 | 
			
		||||
{
 | 
			
		||||
    SDL_Event ev1, *ev = &ev1;
 | 
			
		||||
    int idle = 1;
 | 
			
		||||
 | 
			
		||||
    if (scon->last_vm_running != runstate_is_running()) {
 | 
			
		||||
        scon->last_vm_running = runstate_is_running();
 | 
			
		||||
@@ -587,12 +592,15 @@ void sdl2_poll_events(struct sdl2_console *scon)
 | 
			
		||||
    while (SDL_PollEvent(ev)) {
 | 
			
		||||
        switch (ev->type) {
 | 
			
		||||
        case SDL_KEYDOWN:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_keydown(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_KEYUP:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_keyup(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_TEXTINPUT:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_textinput(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_QUIT:
 | 
			
		||||
@@ -602,13 +610,16 @@ void sdl2_poll_events(struct sdl2_console *scon)
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_MOUSEMOTION:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_mousemotion(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_MOUSEBUTTONDOWN:
 | 
			
		||||
        case SDL_MOUSEBUTTONUP:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_mousebutton(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_MOUSEWHEEL:
 | 
			
		||||
            idle = 0;
 | 
			
		||||
            handle_mousewheel(ev);
 | 
			
		||||
            break;
 | 
			
		||||
        case SDL_WINDOWEVENT:
 | 
			
		||||
@@ -618,6 +629,18 @@ void sdl2_poll_events(struct sdl2_console *scon)
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (idle) {
 | 
			
		||||
        if (scon->idle_counter < SDL2_MAX_IDLE_COUNT) {
 | 
			
		||||
            scon->idle_counter++;
 | 
			
		||||
            if (scon->idle_counter >= SDL2_MAX_IDLE_COUNT) {
 | 
			
		||||
                scon->dcl.update_interval = GUI_REFRESH_INTERVAL_DEFAULT;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    } else {
 | 
			
		||||
        scon->idle_counter = 0;
 | 
			
		||||
        scon->dcl.update_interval = SDL2_REFRESH_INTERVAL_BUSY;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void sdl_mouse_warp(DisplayChangeListener *dcl,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user