From 89fdb71c854b2b5081e1cb5ec3e26e1bb93e3b60 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Wed, 24 Nov 2010 18:02:06 +0000 Subject: - 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 --- Game/Code/Classes/UDraw.pas | 6 +++++- Game/Code/Classes/URecord.pas | 32 ++++++++------------------------ Game/Code/Classes/UWebCam.pas | 6 +++++- 3 files changed, 18 insertions(+), 26 deletions(-) (limited to 'Game/Code/Classes') diff --git a/Game/Code/Classes/UDraw.pas b/Game/Code/Classes/UDraw.pas index 8b7fd8b4..90efe40e 100644 --- a/Game/Code/Classes/UDraw.pas +++ b/Game/Code/Classes/UDraw.pas @@ -64,7 +64,8 @@ var TickOld: cardinal; TickOld2:cardinal; //end Singbar Mod - ShowNotes: integer; //0=show all; 1=don't show notes+rating; 2=don't show notes, rating, score+score bar; 3=also lyrics + ShowNotes: integer; //0=show all; 1=don't show notes+rating; 2=don't show notes, rating, score+score bar; + //3=also lyrics; 4=hide all @@ -2014,6 +2015,9 @@ var x,y: real; CurTime, TotalTime: real; progress: real; begin + if (ShowNotes>3) then + Exit; + x := Theme.Sing.StaticTimeProgress.x; y := Theme.Sing.StaticTimeProgress.y; width:= Theme.Sing.StaticTimeProgress.w; diff --git a/Game/Code/Classes/URecord.pas b/Game/Code/Classes/URecord.pas index ebb0f5b8..7354d931 100644 --- a/Game/Code/Classes/URecord.pas +++ b/Game/Code/Classes/URecord.pas @@ -301,18 +301,17 @@ var end; end; -// mic: array[0..15] of integer; begin // checks for recording devices and puts them into array; + //Log.LogError('Init recoding devices...'); SetLength(SoundCard, 0); BASS_RecordFree; SC := 0; - //Descr := BASS_RecordGetDeviceDescription(SC); Proceed := BASS_RecordGetDeviceInfo(SC, &Info); - Descr := Info.name; - while {(Descr <> '')} Proceed and not (info.flags and BASS_DEVICE_ENABLED=0) do + while Proceed and not (info.flags and BASS_DEVICE_ENABLED=0) do begin + Descr := Info.name; //If there is another SoundCard with the Same ID, Search an available Name if (IsDuplicate(Descr)) then begin @@ -325,16 +324,15 @@ begin end; SetLength(SoundCard, SC+1); -// Log.LogError('Device #' + IntToStr(SC+1) + ': ' + Descr); + //Log.LogError('Device #' + IntToStr(SC+1) + ': ' + Descr); SoundCard[SC].Description := Descr; - // check for recording inputs -// mic[device] := -1; // default to no change + //check for recording inputs SCI := 0; BASS_RecordInit(SC); Flags := BASS_RecordGetInput(SCI, PSingle(nil)^); InputName := BASS_RecordGetInputName(SCI); -// Log.LogError('Input #' + IntToStr(SCI) + ' (' + IntToStr(Flags) + '): ' + InputName); + //Log.LogError('Input #' + IntToStr(SCI) + ' (' + IntToStr(Flags) + '): ' + InputName); SetLength(SoundCard[SC].Input, 1); SoundCard[SC].Input[SCI].Name := InputName; @@ -347,33 +345,19 @@ begin SetLength(SoundCard[SC].Input, SCI+1); InputName := BASS_RecordGetInputName(SCI); SoundCard[SC].Input[SCI].Name := InputName; -// Log.LogError('Input #' + IntToStr(SCI) + ' (' + IntToStr(Flags) + '): ' + InputName); + //Log.LogError('Input #' + IntToStr(SCI) + ' (' + IntToStr(Flags) + '): ' + InputName); end; -{ if (flags and BASS_INPUT_TYPE_MASK) = BASS_INPUT_TYPE_MIC then begin - mic[device] := input; // auto set microphone - end;} - Inc(SCI); Flags := BASS_RecordGetInput(SCI, PSingle(nil)^); end; -{ if mic[device] <> -1 then begin - Log.LogAnalyze('Found the mic at input ' + IntToStr(Mic[device])) - end else begin - Log.LogAnalyze('Mic not found'); - mic[device] := 0; // setting to the first one (for kxproject) - end; - SoundCard[SC].InputSeleceted := Mic[Device];} - - BASS_RecordFree; Inc(SC); - //Descr := BASS_RecordGetDeviceDescription(SC); Proceed := BASS_RecordGetDeviceInfo(SC, &Info); - Descr := Info.name; end; // while + //Log.LogError('End of Init recoding devices.'); end; end. diff --git a/Game/Code/Classes/UWebCam.pas b/Game/Code/Classes/UWebCam.pas index 5abb7622..9457a28d 100644 --- a/Game/Code/Classes/UWebCam.pas +++ b/Game/Code/Classes/UWebCam.pas @@ -75,6 +75,9 @@ const width = 320; height = 240; +var + IWebCamDevice: TList; + begin if WebCamReady then exit; @@ -84,7 +87,8 @@ begin if(Ini.EnableWebCam=0) then exit; - if (Length(GetCapDevices())-1 < Ini.WebCamID) then + GetCapDevices(IWebCamDevice); + if (Length(IWebCamDevice)-1 < Ini.WebCamID) then Exit; try -- cgit v1.2.3