diff options
author | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-11-24 18:02:06 +0000 |
---|---|---|
committer | brunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-11-24 18:02:06 +0000 |
commit | 89fdb71c854b2b5081e1cb5ec3e26e1bb93e3b60 (patch) | |
tree | 3659689b9c8e790b26d6637ed592e395a1c66c0a /Game/Code/lib | |
parent | 9792c8c1af8dc0733e3851a2f094897590b25605 (diff) | |
download | usdx-89fdb71c854b2b5081e1cb5ec3e26e1bb93e3b60.tar.gz usdx-89fdb71c854b2b5081e1cb5ec3e26e1bb93e3b60.tar.xz usdx-89fdb71c854b2b5081e1cb5ec3e26e1bb93e3b60.zip |
- fix: crash at startup (my fault)
- fix: it was possible to add non-medley songs to the medley playlist -> crash in singscreen
- updated polish language (thx to Pit33)
- deactivate all elements (but not background/video) in singscreen (with "N")
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2751 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/lib')
-rw-r--r-- | Game/Code/lib/DSPack/UCaptureWDM.pas | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/Game/Code/lib/DSPack/UCaptureWDM.pas b/Game/Code/lib/DSPack/UCaptureWDM.pas index 156e160a..c483e58a 100644 --- a/Game/Code/lib/DSPack/UCaptureWDM.pas +++ b/Game/Code/lib/DSPack/UCaptureWDM.pas @@ -8,7 +8,7 @@ unit UCaptureWDM; interface
uses
- Classes, Windows, DSPack, DirectShow9, DSUtil, SDL, ExtCtrls, SyncObjs;
+ Classes, Windows, DSPack, DirectShow9, DSUtil, SDL, ExtCtrls, SyncObjs, ULog;
type
TCaptureState = (csPlay, csStop, csDisbaled);
@@ -66,27 +66,36 @@ type procedure Stop;
end;
- function GetCapDevices: TList;
function ListMediaTypes(DeviceID: integer): TList;
+ procedure GetCapDevices(var names: TList);
implementation
uses
Graphics, SysUtils;
-function GetCapDevices: TList;
+procedure GetCapDevices(var names: TList);
var
k: Integer;
tSysDev: TSysDevEnum;
begin
- SetLength(Result, 0);
- tSysDev := TSysDevEnum.Create(CLSID_VideoInputDeviceCategory);
-
- SetLength(Result, tSysDev.CountFilters);
- for k := 0 to tSysDev.CountFilters - 1 do
- Result[k] := tSysDev.Filters[k].FriendlyName;
+ SetLength(names, 0);
+ try
+ tSysDev := TSysDevEnum.Create(CLSID_VideoInputDeviceCategory);
+ SetLength(names, tSysDev.CountFilters);
+ for k := 0 to tSysDev.CountFilters - 1 do
+ names[k] := tSysDev.Filters[k].FriendlyName;
+ except
+ SetLength(names, 0);
+ //Log.LogError('GetCapDevices #4');
+ end;
- tSysDev.Free;
+ try
+ if (tSysDev<>nil) then
+ tSysDev.Free;
+ except
+ //Log.LogError('GetCapDevices #6');
+ end;
end;
function ListMediaTypes(DeviceID: integer): TList;
|