From 5b727b58b70466a48b63e43ca4355c475ea2010f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 18 Jul 2014 19:39:53 +0200 Subject: [PATCH] Make init_video_input more robust - just failing the entire program like this instead of defaulting to sane defaults is unacceptable --- driver.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/driver.c b/driver.c index 9022076c3f..c2d70c3a77 100644 --- a/driver.c +++ b/driver.c @@ -1163,8 +1163,14 @@ void init_video_input(void) // Video driver didn't provide an input driver so we use configured one. if (driver.input == NULL) { + RARCH_LOG("Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.\n"); - driver.input = tmp; + + if (tmp) + driver.input = tmp; + else + find_input_driver(); + if (driver.input) { driver.input_data = input_init_func(); @@ -1177,7 +1183,7 @@ void init_video_input(void) else { // This should never really happen as tmp (driver.input) is always found before this in find_driver_input(), - // or we have aborted in a similar fahsion anyways. + // or we have aborted in a similar fashion anyways. rarch_fail(1, "init_video_input()"); } }