Skip to content

Commit

Permalink
fixed push-to-talk delay hotkey (wasn't working because everything us…
Browse files Browse the repository at this point in the history
…es nanosecond timing rather than millisecond)
  • Loading branch information
jp9000 committed Oct 20, 2013
1 parent f7a512f commit b146feb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/OBS.h
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ class OBS
HANDLE hHotkeyThread;

bool bUsingPushToTalk, bPushToTalkDown, bPushToTalkOn;
int pushToTalkDelay, pushToTalkTimeLeft;
long long pushToTalkDelay, pushToTalkTimeLeft;

UINT pushToTalkHotkeyID;
UINT muteMicHotkeyID;
Expand Down
2 changes: 1 addition & 1 deletion Source/OBSHotkeyHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void STDCALL OBS::PushToTalkHotkey(DWORD hotkey, UPARAM param, bool bDown)
else if(App->pushToTalkDelay <= 0)
App->bPushToTalkOn = false;

App->pushToTalkTimeLeft = App->pushToTalkDelay;
App->pushToTalkTimeLeft = App->pushToTalkDelay*1000000;
OSDebugOut(TEXT("Actual delay: %d"), App->pushToTalkDelay);
}

Expand Down
2 changes: 1 addition & 1 deletion Source/SettingsAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void SettingsAudio::ApplySettings()
AppConfig->SetInt(TEXT("Audio"), TEXT("UsePushToTalk"), App->bUsingPushToTalk);
AppConfig->SetInt(TEXT("Audio"), TEXT("PushToTalkHotkey"), hotkey);
AppConfig->SetInt(TEXT("Audio"), TEXT("PushToTalkHotkey2"), hotkey2);
AppConfig->SetInt(TEXT("Audio"), TEXT("PushToTalkDelay"), App->pushToTalkDelay);
AppConfig->SetInt(TEXT("Audio"), TEXT("PushToTalkDelay"), (int)App->pushToTalkDelay);

if(App->pushToTalkHotkeyID)
{
Expand Down

0 comments on commit b146feb

Please sign in to comment.