mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[sim] Move HAL_LoadExtensions to end of HAL_Initialize (#2571)
Previously, HAL_InitializeDriverStation would reset any callbacks set in extensions during load.
This commit is contained in:
@@ -284,8 +284,6 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
|
||||
hal::init::HAL_IsInitialized.store(true);
|
||||
|
||||
wpi::outs().SetUnbuffered();
|
||||
if (HAL_LoadExtensions() < 0) return false;
|
||||
hal::RestartTiming();
|
||||
HAL_InitializeDriverStation();
|
||||
|
||||
@@ -307,6 +305,9 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
wpi::outs().SetUnbuffered();
|
||||
if (HAL_LoadExtensions() < 0) return false;
|
||||
|
||||
return true; // Add initialization if we need to at a later point
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user