mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-22 01:40:49 +00:00
use 'and' control flow operator
add debug log message if caller was login method
This commit is contained in:
parent
af55e8ce1f
commit
2c5783b1a1
@ -40,7 +40,7 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def login
|
def login
|
||||||
run_voicemeeter(kind.name) if CBindings.call(:bind_login, ok: [0, 1]) == 1
|
CBindings.call(:bind_login, ok: [0, 1]) == 1 and run_voicemeeter(kind.name)
|
||||||
clear_dirty
|
clear_dirty
|
||||||
logger.info "Successfully logged into #{self} version #{version}"
|
logger.info "Successfully logged into #{self} version #{version}"
|
||||||
end
|
end
|
||||||
@ -78,6 +78,9 @@ module Voicemeeter
|
|||||||
banana: Kinds::KindEnum::BANANA,
|
banana: Kinds::KindEnum::BANANA,
|
||||||
potato: (Install::OS_BITS == 64) ? Kinds::KindEnum::POTATOX64 : Kinds::KindEnum::POTATO
|
potato: (Install::OS_BITS == 64) ? Kinds::KindEnum::POTATOX64 : Kinds::KindEnum::POTATO
|
||||||
}
|
}
|
||||||
|
if caller(1..1).first[/`(.*)'/, 1] == "login"
|
||||||
|
logger.debug("Voicemeeter engine running but the GUI appears to be down... launching.")
|
||||||
|
end
|
||||||
CBindings.call(:bind_run_voicemeeter, kinds[kind_id])
|
CBindings.call(:bind_run_voicemeeter, kinds[kind_id])
|
||||||
sleep(1)
|
sleep(1)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user