mirror of https://github.com/mpv-player/mpv
osdep/terminal.h: Rename screen buffer controls
SAVE/RESTORE were a bit misleading.
This commit is contained in:
parent
a4cac2ddc6
commit
08747c4965
|
@ -28,8 +28,8 @@
|
|||
#define TERM_ESC_RESTORE_CURSOR "\033[?25h"
|
||||
|
||||
#define TERM_ESC_CLEAR_SCREEN "\033[2J"
|
||||
#define TERM_ESC_SAVE_SCREEN "\033[?1049h"
|
||||
#define TERM_ESC_RESTORE_SCREEN "\033[?1049l"
|
||||
#define TERM_ESC_ALT_SCREEN "\033[?1049h"
|
||||
#define TERM_ESC_NORMAL_SCREEN "\033[?1049l"
|
||||
|
||||
struct input_ctx;
|
||||
|
||||
|
|
|
@ -505,7 +505,7 @@ static int preinit(struct vo *vo)
|
|||
sixel_output_set_encode_policy(priv->output, SIXEL_ENCODEPOLICY_FAST);
|
||||
|
||||
if (priv->opts.alt_screen)
|
||||
sixel_strwrite(TERM_ESC_SAVE_SCREEN);
|
||||
sixel_strwrite(TERM_ESC_ALT_SCREEN);
|
||||
|
||||
sixel_strwrite(TERM_ESC_HIDE_CURSOR);
|
||||
|
||||
|
@ -549,7 +549,7 @@ static void uninit(struct vo *vo)
|
|||
sixel_strwrite(TERM_ESC_RESTORE_CURSOR);
|
||||
|
||||
if (priv->opts.alt_screen)
|
||||
sixel_strwrite(TERM_ESC_RESTORE_SCREEN);
|
||||
sixel_strwrite(TERM_ESC_NORMAL_SCREEN);
|
||||
fflush(stdout);
|
||||
|
||||
if (priv->output) {
|
||||
|
|
|
@ -278,7 +278,7 @@ static void flip_page(struct vo *vo)
|
|||
static void uninit(struct vo *vo)
|
||||
{
|
||||
printf(TERM_ESC_RESTORE_CURSOR);
|
||||
printf(TERM_ESC_RESTORE_SCREEN);
|
||||
printf(TERM_ESC_NORMAL_SCREEN);
|
||||
struct priv *p = vo->priv;
|
||||
if (p->frame)
|
||||
talloc_free(p->frame);
|
||||
|
@ -302,7 +302,7 @@ static int preinit(struct vo *vo)
|
|||
}
|
||||
|
||||
printf(TERM_ESC_HIDE_CURSOR);
|
||||
printf(TERM_ESC_SAVE_SCREEN);
|
||||
printf(TERM_ESC_ALT_SCREEN);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue