giorefreshrate

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: MIT, Unlicense Imports: 2 Imported by: 0

README

GioRefreshRate

Allows to set the display refresh rate on Android. Some manufacturers limit apps using SurfaceView (such as gio) to 60hz, this library can bring it back and have that scroll be smooth.

Uses the same approach as flutter_displaymode.

Getting Started

Run go get github.com/ilidemi/giorefreshrate

Call giorefreshrate.PreferHighRefreshRate() or giorefreshrate.PreferLowRefreshRate() before the event loop and provide giorefreshrate access to the Window events:

+   giorefreshrate.PreferHighRefreshRate()

    for evt := range w.Events() { // Gio main event loop
+       giorefreshrate.ListenEvents(evt, w)

        switch evt := evt.(type) {
            // ...
        }
    }

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenEvents

func ListenEvents(event event.Event, w *app.Window) error

func PreferHighRefreshRate

func PreferHighRefreshRate()

func PreferLowRefreshRate

func PreferLowRefreshRate()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL