add a parameter check
This commit is contained in:
parent
e0259e6254
commit
7c93980530
@ -98,6 +98,8 @@ namespace API
|
|||||||
|
|
||||||
void effects_bground(window wd, const effects::bground_factory_interface& factory, double fade_rate)
|
void effects_bground(window wd, const effects::bground_factory_interface& factory, double fade_rate)
|
||||||
{
|
{
|
||||||
|
if (fade_rate < 0.0 || fade_rate > 1.0)
|
||||||
|
throw std::invalid_argument("effects_bground: value range of fade_rate must be [0, 1].");
|
||||||
auto const iwd = reinterpret_cast<restrict::core_window_t*>(wd);
|
auto const iwd = reinterpret_cast<restrict::core_window_t*>(wd);
|
||||||
internal_scope_guard isg;
|
internal_scope_guard isg;
|
||||||
if(restrict::window_manager.available(iwd))
|
if(restrict::window_manager.available(iwd))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user