mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Print GLFW errors
This commit is contained in:
parent
2babc8dde1
commit
1e4d3e2661
1 changed files with 5 additions and 0 deletions
|
@ -27,6 +27,11 @@ pub struct Application;
|
|||
|
||||
impl ApplicationMethods for Application {
|
||||
fn new() -> Application {
|
||||
// Per GLFW docs it's safe to set the error callback before calling
|
||||
// glfwInit(), and this way we notice errors from init too.
|
||||
do glfw::set_error_callback |_error_code, description| {
|
||||
error!("GLFW error: %s", description);
|
||||
};
|
||||
glfw::init();
|
||||
Application
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue