mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
(FreeBSD) Added support for rebooting and powering off from inside ES-DE
This commit is contained in:
parent
3f5e277cd6
commit
338843ce46
|
@ -43,8 +43,8 @@ namespace Utils
|
||||||
{
|
{
|
||||||
#if defined(_WIN64)
|
#if defined(_WIN64)
|
||||||
return system("shutdown -r -t 0");
|
return system("shutdown -r -t 0");
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__) || defined(__FreeBSD__)
|
||||||
// This will probably never be used as macOS requires root privileges to reboot.
|
// This will probably never be used on macOS as it requires root privileges to reboot.
|
||||||
return system("shutdown -r now");
|
return system("shutdown -r now");
|
||||||
#else
|
#else
|
||||||
return system("shutdown --reboot now");
|
return system("shutdown --reboot now");
|
||||||
|
@ -58,6 +58,8 @@ namespace Utils
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
// This will probably never be used as macOS requires root privileges to power off.
|
// This will probably never be used as macOS requires root privileges to power off.
|
||||||
return system("shutdown now");
|
return system("shutdown now");
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
return system("shutdown -p now");
|
||||||
#else
|
#else
|
||||||
return system("shutdown --poweroff now");
|
return system("shutdown --poweroff now");
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue