Add MacDevice
Summary: Add a desktop device on MacOS similar to WindowsDevice (see D8861986). This makes it possible to view Oculus Service Log files on MacOS too. Reviewed By: danielbuechele Differential Revision: D15147501 fbshipit-source-id: 8a076964e6111bf3786818b7cbd8bb7f81c1498d
This commit is contained in:
committed by
Facebook Github Bot
parent
8ba4feba66
commit
d9bb1c5cf1
27
src/dispatcher/desktopDevice.js
Normal file
27
src/dispatcher/desktopDevice.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright 2018-present Facebook.
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {Store} from '../reducers/index.js';
|
||||
import type {Logger} from '../fb-interfaces/Logger.js';
|
||||
|
||||
import MacDevice from '../devices/MacDevice';
|
||||
import WindowsDevice from '../devices/WindowsDevice';
|
||||
|
||||
export default (store: Store, logger: Logger) => {
|
||||
var device;
|
||||
if (process.platform === 'darwin') {
|
||||
device = new MacDevice();
|
||||
} else if (process.platform === 'win32') {
|
||||
device = new WindowsDevice();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
store.dispatch({
|
||||
type: 'REGISTER_DEVICE',
|
||||
payload: device,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user