mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-20 02:08:13 +00:00
Fixed memory leak and removed debug code from Windows sensor implementation
This commit is contained in:
@@ -281,6 +281,9 @@ static int ConnectSensor(ISensor *sensor)
|
||||
} else {
|
||||
name = SDL_strdup("Unknown Sensor");
|
||||
}
|
||||
if (bstr_name != NULL) {
|
||||
SysFreeString(bstr_name);
|
||||
}
|
||||
if (!name) {
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
@@ -339,8 +342,6 @@ SDL_WINDOWS_SensorInit(void)
|
||||
HRESULT hr;
|
||||
ISensorCollection *sensor_collection = NULL;
|
||||
|
||||
while (!IsDebuggerPresent()) Sleep(100);
|
||||
|
||||
if (WIN_CoInitialize() == S_OK) {
|
||||
SDL_windowscoinit = SDL_TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user