forked from akanyan/mu3-mods
feat!: rename and reorganize
This commit is contained in:
26
Fixes/FrameRate/MU3.Notes/patch_NotesManager.cs
Normal file
26
Fixes/FrameRate/MU3.Notes/patch_NotesManager.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using MU3.Game;
|
||||
using MU3.Sys;
|
||||
using MU3.Util;
|
||||
|
||||
namespace MU3.Notes;
|
||||
|
||||
class patch_NotesManager: NotesManager {
|
||||
private float _frame;
|
||||
private float _frameReal;
|
||||
private bool _altMode;
|
||||
public extern void orig_initialize(SessionInfo sessionInfo);
|
||||
public new void initialize(SessionInfo sessionInfo) {
|
||||
orig_initialize(sessionInfo);
|
||||
|
||||
var cfg = (patch_Config)Singleton<Sys.System>.instance.config;
|
||||
_altMode = cfg.isVsync || (cfg.framerate != 60);
|
||||
}
|
||||
private extern void orig_progressFrameAndFrameReal();
|
||||
private void progressFrameAndFrameReal() {
|
||||
if(_altMode) {
|
||||
_frame = _frameReal;
|
||||
} else {
|
||||
orig_progressFrameAndFrameReal();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user