MCPcopy Create free account
hub / github.com/crownengine/crown / open

Method open

src/device/main_linux.cpp:297–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295 }
296
297 void open()
298 {
299 char jspath[] = "/dev/input/jsX";
300 char *num = strchr(jspath, 'X');
301
302 for (u32 ii = 0; ii < CROWN_MAX_JOYPADS; ++ii) {
303 *num = '0' + ii;
304 _fd[ii] = ::open(jspath, O_RDONLY);
305 _queue->push_status_event(InputDeviceType::JOYPAD, ii, _fd[ii] >= 0);
306 }
307 }
308
309 void close()
310 {

Callers 15

read_temporaryMethod · 0.45
write_temporaryMethod · 0.45
readMethod · 0.45
read_optionalMethod · 0.45
compileFunction · 0.45
open_streamMethod · 0.45
runMethod · 0.45
compileFunction · 0.45
read_data_versionsFunction · 0.45
read_data_indexFunction · 0.45
read_data_mtimesFunction · 0.45
read_data_dependenciesFunction · 0.45

Calls 2

strchrFunction · 0.85
openFunction · 0.85

Tested by

no test coverage detected