Add Enter/ExitCriticalSection to Periphery code
This commit is contained in:
parent
85e06f07ce
commit
ea1b3f28b5
|
@ -111,7 +111,7 @@ namespace Assets {
|
|||
|
||||
namespace XAAudio {
|
||||
void play_fox() {
|
||||
CDXA::play(lba, FOX_XA, 1, true);
|
||||
CDXA::play(lba, FOX_XA, 0, false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -176,7 +176,6 @@ namespace JabyEngine {
|
|||
send_read_n0(cur_file.cur_lba);
|
||||
}
|
||||
|
||||
|
||||
void continue_reading() {
|
||||
if(current_state == State::BufferFull) {
|
||||
Command::wait_completed();
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "../../internal-include/periphery_internal.hpp"
|
||||
#include <PSX/Periphery/periphery.hpp>
|
||||
#include <PSX/System/syscalls.hpp>
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace Periphery {
|
||||
|
@ -87,6 +88,7 @@ namespace JabyEngine {
|
|||
void query_controller() {
|
||||
static constexpr auto TypeIDX = 1;
|
||||
|
||||
SysCall::EnterCriticalSection();
|
||||
Periphery::connect_to(cur_controller_port);
|
||||
for(uint32_t id = 0; id < Periphery::DeviceCount; id++) {
|
||||
auto &cur_controller = controller[cur_controller_port][id];
|
||||
|
@ -128,6 +130,7 @@ namespace JabyEngine {
|
|||
if(Configuration::Periphery::include_portB()) {
|
||||
cur_controller_port ^= 0x1;
|
||||
}
|
||||
SysCall::ExitCriticalSection();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue