From 619a2ee4dd6cf64a92f37f27e13a24d3adc1c36a Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 15 Sep 2022 00:27:09 +0900 Subject: [PATCH] internal/gamepaddb: use runtime.GOOS instead of a build tag Updates #1415 --- internal/gamepaddb/gamepaddb.go | 2 +- internal/gamepaddb/gamepaddb_ios.go | 20 -------------------- internal/gamepaddb/gamepaddb_notios.go | 20 -------------------- 3 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 internal/gamepaddb/gamepaddb_ios.go delete mode 100644 internal/gamepaddb/gamepaddb_notios.go diff --git a/internal/gamepaddb/gamepaddb.go b/internal/gamepaddb/gamepaddb.go index 067538aa3..5023e18df 100644 --- a/internal/gamepaddb/gamepaddb.go +++ b/internal/gamepaddb/gamepaddb.go @@ -70,7 +70,7 @@ func init() { return } - if isIOS { + if runtime.GOOS == "ios" { currentPlatform = platformIOS return } diff --git a/internal/gamepaddb/gamepaddb_ios.go b/internal/gamepaddb/gamepaddb_ios.go deleted file mode 100644 index 9fa5a685d..000000000 --- a/internal/gamepaddb/gamepaddb_ios.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2021 The Ebiten Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build darwin && ios -// +build darwin,ios - -package gamepaddb - -const isIOS = true diff --git a/internal/gamepaddb/gamepaddb_notios.go b/internal/gamepaddb/gamepaddb_notios.go deleted file mode 100644 index 1c1829095..000000000 --- a/internal/gamepaddb/gamepaddb_notios.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2021 The Ebiten Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !darwin || !ios -// +build !darwin !ios - -package gamepaddb - -const isIOS = false