Skip to content

Instantly share code, notes, and snippets.

View slobodin's full-sized avatar

Nikolay Slobodin slobodin

  • Russia, Saint Petersburg
View GitHub Profile
// Query all input devices.
// We do this so that we can see them in the log as they are enumerated.
int[] ids = mInputManager.getInputDeviceIds();
for (int id : ids) {
InputDeviceState state = getInputDeviceState(id);
if (state != null && deviceIsJoystick(state.getDevice()))
addJoystick(0);
}
public static boolean isAndroidTV() {
try {
Activity activity = GameActivity.getSharedActivity();
UiModeManager uiModeManager = (UiModeManager) activity.getSystemService(UI_MODE_SERVICE);
if (uiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) {
MyLog.i(TAG, "Running on a TV Device");
return true;
} else {
MyLog.i(TAG, "Running on a non-TV Device");
return false;
@slobodin
slobodin / tools-engineer-checklist.md
Created August 14, 2018 07:24 — forked from gorlak/tools-engineer-checklist.md
Tools Engineer Checklist

This list is provided as a guide for tools engineers of all skill levels looking for jobs in the game industry. It's meant as a guide to topics that should be pursued broadly in order to be well spoken in an interview. I doubt any hiring manager requires deep knowedge across every topic, but an ideal candidate would be somewhat knowledgable (aware of its existence if asked directly) with all topics here.

Each list of bullets increases in difficulty, so later bullets are more applicable to senior (or even director) level candidates.

Good luck.

@gorlak

Math