mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
player: move terminal input init to a better place
Mostly of cosmetic nature. Move initialization to the same place where another component (cocoa) will start accessing the input context from a foreign thread.
This commit is contained in:
parent
a2d790b3a4
commit
f12b70d77d
@ -440,9 +440,6 @@ int mp_initialize(struct MPContext *mpctx)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (opts->consolecontrols && cas_terminal_owner(mpctx, mpctx))
|
||||
terminal_setup_getch(mpctx->input);
|
||||
|
||||
#if !HAVE_LIBASS
|
||||
MP_WARN(mpctx, "Compiled without libass.\n");
|
||||
MP_WARN(mpctx, "There will be no OSD and no text subtitles.\n");
|
||||
@ -455,6 +452,9 @@ int mp_initialize(struct MPContext *mpctx)
|
||||
|
||||
mp_get_resume_defaults(mpctx);
|
||||
|
||||
if (opts->consolecontrols && cas_terminal_owner(mpctx, mpctx))
|
||||
terminal_setup_getch(mpctx->input);
|
||||
|
||||
#if HAVE_COCOA
|
||||
cocoa_set_input_context(mpctx->input);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user