notcurses-input: allow failure from mouse_enable()

pull/2122/head
nick black 3 years ago committed by nick black
parent b8c01eacc8
commit fe83d258d6

@ -338,9 +338,7 @@ int main(void){
notcurses_options nopts{}; notcurses_options nopts{};
nopts.flags = NCOPTION_INHIBIT_SETLOCALE; nopts.flags = NCOPTION_INHIBIT_SETLOCALE;
NotCurses nc(nopts); NotCurses nc(nopts);
if(!nc.mouse_enable()){ nc.mouse_enable(); // might fail if no mouse is available
return EXIT_FAILURE;
}
int ret = input_demo(&nc); int ret = input_demo(&nc);
if(!nc.stop() || ret){ if(!nc.stop() || ret){
return EXIT_FAILURE; return EXIT_FAILURE;

Loading…
Cancel
Save