1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-22 07:46:55 +00:00

Rename getch2....c/h to terminal....c/h

"getch2" really tells nothing about what the heck this code does. It'd
be even worse when moving the rest of terminal handling code there.
This commit is contained in:
wm4 2013-12-19 21:31:27 +01:00
parent 8c7ea10873
commit 25d4ae74f1
11 changed files with 16 additions and 19 deletions

View File

@ -27,7 +27,7 @@
#include "config.h"
#include "common/global.h"
#include "osdep/getch2.h"
#include "osdep/terminal.h"
#include "osdep/io.h"
#ifndef __MINGW32__

View File

@ -36,7 +36,6 @@
#include <libavutil/common.h>
#include "osdep/io.h"
#include "osdep/getch2.h"
#include "input.h"
#include "keycodes.h"
@ -1859,12 +1858,6 @@ static void read_events(struct input_ctx *ictx, int time)
}
}
static void read_all_events(struct input_ctx *ictx, int time)
{
getch2_poll();
read_events(ictx, time);
}
int mp_input_queue_cmd(struct input_ctx *ictx, mp_cmd_t *cmd)
{
input_lock(ictx);
@ -1919,7 +1912,7 @@ mp_cmd_t *mp_input_get_cmd(struct input_ctx *ictx, int time, int peek_only)
if (ictx->cmd_queue.first)
time = 0;
read_all_events(ictx, time);
read_events(ictx, time);
struct cmd_queue *queue = &ictx->cmd_queue;
if (!queue->first) {
struct mp_cmd *repeated = check_autorepeat(ictx);
@ -2529,7 +2522,7 @@ int mp_input_check_interrupt(struct input_ctx *ictx, int time)
input_lock(ictx);
bool res = test_abort(ictx);
if (!res) {
read_all_events(ictx, time);
read_events(ictx, time);
res = test_abort(ictx);
}
input_unlock(ictx);

View File

@ -876,7 +876,7 @@ fi
extra_cflags="-I. -D_GNU_SOURCE $extra_cflags"
_timer=timer-linux.c
_getch=getch2.c
_getch=terminal-unix.c
if freebsd || openbsd ; then
extra_ldflags="$extra_ldflags -L/usr/local/lib"
@ -908,7 +908,7 @@ if win32 ; then
fi
if mingw32 ; then
_getch=getch2-win.c
_getch=terminal-win.c
extra_cflags="$extra_cflags -D__USE_MINGW_ANSI_STDIO=1"
# Hack for missing BYTE_ORDER declarations in <sys/types.h>.
# (For some reason, they are in <sys/param.h>, but we don't bother switching

View File

@ -45,7 +45,7 @@
#include "bstr/bstr.h"
#include "input/input.h"
#include "input/keycodes.h"
#include "getch2.h"
#include "terminal.h"
#if HAVE_TERMIOS
static volatile struct termios tio_orig;

View File

@ -30,7 +30,7 @@
#include <windows.h>
#include "input/keycodes.h"
#include "input/input.h"
#include "getch2.h"
#include "terminal.h"
int mp_input_slave_cmd_func(int fd, char *dest, int size)
{

View File

@ -26,8 +26,8 @@
#include "config.h"
#include "talloc.h"
#include "osdep/getch2.h"
#include "osdep/io.h"
#include "osdep/terminal.h"
#include "osdep/timer.h"
#include "common/msg.h"

View File

@ -28,8 +28,8 @@
#include "talloc.h"
#include "osdep/io.h"
#include "osdep/getch2.h"
#include "osdep/priority.h"
#include "osdep/terminal.h"
#include "osdep/timer.h"
#include "common/av_log.h"

View File

@ -32,7 +32,7 @@
#include "options/m_property.h"
#include "common/encode.h"
#include "osdep/getch2.h"
#include "osdep/terminal.h"
#include "osdep/timer.h"
#include "demux/demux.h"

View File

@ -33,6 +33,7 @@
#include "common/playlist.h"
#include "input/input.h"
#include "osdep/terminal.h"
#include "osdep/timer.h"
#include "audio/mixer.h"
@ -1310,6 +1311,8 @@ void run_playloop(struct MPContext *mpctx)
handle_force_window(mpctx, false);
execute_queued_seek(mpctx);
getch2_poll();
}
// Waiting for the slave master to send us a new file to play.
@ -1339,5 +1342,6 @@ void idle_loop(struct MPContext *mpctx)
run_command(mpctx, cmd);
mp_cmd_free(cmd);
mp_flush_events(mpctx);
getch2_poll();
}
}

View File

@ -91,8 +91,8 @@ def build(ctx):
target = "ebml_defs.c")
getch2_c = {
'win32': 'osdep/getch2-win.c',
}.get(ctx.env.DEST_OS, "osdep/getch2.c")
'win32': 'osdep/terminal-win.c',
}.get(ctx.env.DEST_OS, "osdep/terminal-unix.c")
timer_c = {
'win32': 'osdep/timer-win2.c',