Fixed memory leak and removed debug code from Windows sensor implementation
This commit is contained in:
parent
55515a8c25
commit
09f552639a
2 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue