Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Evangelos Ribeiro Tzaras
feedbackd
Commits
1af163e7
Commit
1af163e7
authored
Jul 20, 2020
by
Guido Gunther
Committed by
Guido Gunther
Jul 22, 2020
Browse files
feedback-vibra-rumble: Implement is_available
This avoids criticals when there's no rumble vibra available.
parent
75e28510
Changes
1
Show whitespace changes
Inline
Side-by-side
src/fbd-feedback-vibra-rumble.c
View file @
1af163e7
...
...
@@ -137,15 +137,27 @@ fbd_feedback_vibra_rumble_start_vibra (FbdFeedbackVibra *vibra)
}
}
static
gboolean
fbd_feedback_vibra_rumble_is_available
(
FbdFeedbackBase
*
base
)
{
FbdFeedbackManager
*
manager
=
fbd_feedback_manager_get_default
();
FbdDevVibra
*
dev
=
fbd_feedback_manager_get_dev_vibra
(
manager
);
return
FBD_IS_DEV_VIBRA
(
dev
);
}
static
void
fbd_feedback_vibra_rumble_class_init
(
FbdFeedbackVibraRumbleClass
*
klass
)
{
GObjectClass
*
object_class
=
G_OBJECT_CLASS
(
klass
);
FbdFeedbackBaseClass
*
base_class
=
FBD_FEEDBACK_BASE_CLASS
(
klass
);
FbdFeedbackVibraClass
*
vibra_class
=
FBD_FEEDBACK_VIBRA_CLASS
(
klass
);
object_class
->
set_property
=
fbd_feedback_vibra_rumble_set_property
;
object_class
->
get_property
=
fbd_feedback_vibra_rumble_get_property
;
base_class
->
is_available
=
fbd_feedback_vibra_rumble_is_available
;
vibra_class
->
start_vibra
=
fbd_feedback_vibra_rumble_start_vibra
;
vibra_class
->
end_vibra
=
fbd_feedback_vibra_rumble_end_vibra
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment