Patch #5195 by Anders Gudmundson.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 11 Nov 2006 22:47:41 +0000 (22:47 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sat, 11 Nov 2006 22:47:41 +0000 (22:47 +0000)
On X11, make the table device name check case insensitive.

intern/ghost/intern/GHOST_WindowX11.cpp

index d96e4937f169c9f43f594f17986afbce393b5c7b..0fe101ab258a78cd8f885882448df6e9ad8ed9e7 100755 (executable)
@@ -235,7 +235,7 @@ void GHOST_WindowX11::initXInputDevices()
                        old_handler = XSetErrorHandler(ApplicationErrorHandler) ;
 
                        for(int i=0; i<device_count; ++i) {
                        old_handler = XSetErrorHandler(ApplicationErrorHandler) ;
 
                        for(int i=0; i<device_count; ++i) {
-                               if(!strcmp(device_info[i].name, "stylus")) {
+                               if(!strcasecmp(device_info[i].name, "stylus")) {
                                        m_xtablet.StylusID= device_info[i].id;
                                        m_xtablet.StylusDevice = XOpenDevice(m_display, m_xtablet.StylusID);
 
                                        m_xtablet.StylusID= device_info[i].id;
                                        m_xtablet.StylusDevice = XOpenDevice(m_display, m_xtablet.StylusID);
 
@@ -260,7 +260,7 @@ void GHOST_WindowX11::initXInputDevices()
                                                m_xtablet.StylusID= 0;
                                        }
                                }
                                                m_xtablet.StylusID= 0;
                                        }
                                }
-                               if(!strcmp(device_info[i].name, "eraser")) {
+                               if(!strcasecmp(device_info[i].name, "eraser")) {
                                        m_xtablet.EraserID= device_info[i].id;
                                        m_xtablet.EraserDevice = XOpenDevice(m_display, m_xtablet.EraserID);
                                        if (m_xtablet.EraserDevice == NULL) m_xtablet.EraserID= 0;
                                        m_xtablet.EraserID= device_info[i].id;
                                        m_xtablet.EraserDevice = XOpenDevice(m_display, m_xtablet.EraserID);
                                        if (m_xtablet.EraserDevice == NULL) m_xtablet.EraserID= 0;