Skip to content

Commit b2a3c6a

Browse files
committed
Rename to SetMain
1 parent b761936 commit b2a3c6a

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

raylib/platform_android.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ import (
5252

5353
var callbackHolder func()
5454

55-
// SetCallbackFunc - Sets callback function
56-
func SetCallbackFunc(callback func()) {
55+
// SetMain - Sets callback function
56+
func SetMain(callback func()) {
5757
callbackHolder = callback
5858
}
5959

@@ -224,7 +224,7 @@ func openAssetFile(root, name string) (fs.File, error) {
224224
if C.IsAssetDir(cname) != 0 {
225225
return nil, fmt.Errorf("cannot open directory as file: %s", fullPath)
226226
}
227-
227+
228228
return nil, fmt.Errorf("asset file not found: %s", fullPath)
229229
}
230230

raylib/platform_desktop.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"unsafe"
1717
)
1818

19-
// SetCallbackFunc - Sets callback function
20-
func SetCallbackFunc(func()) {
19+
// SetMain - Sets callback function
20+
func SetMain(func()) {
2121
}
2222

2323
// ShowCursor - Shows cursor

raylib/platform_drm.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ package rl
99
*/
1010
import "C"
1111

12-
// SetCallbackFunc - Sets callback function
13-
func SetCallbackFunc(func()) {
12+
// SetMain - Sets callback function
13+
func SetMain(func()) {
1414
return
1515
}
1616

raylib/raylib.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ func init() {
2121
runtime.LockOSThread()
2222
}
2323

24-
// For compatibility with WASM bindings.
25-
// https://github.com/BrownNPC/Raylib-Go-Wasm
26-
var SetMain = SetCallbackFunc
27-
2824
// Wave type, defines audio wave data
2925
type Wave struct {
3026
// Number of samples

raylib/raylib_purego.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3958,8 +3958,8 @@ func DetachAudioMixedProcessor(processor AudioCallback) {
39583958
detachAudioMixedProcessor(fn)
39593959
}
39603960

3961-
// SetCallbackFunc - Sets callback function
3962-
func SetCallbackFunc(func()) {
3961+
// SetMain - Sets callback function
3962+
func SetMain(func()) {
39633963
}
39643964

39653965
// NewImageFromImage - Returns new Image from Go image.Image

0 commit comments

Comments
 (0)