@thenick775/mgba-wasm 2.4.1 → 2.5.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mgba.d.ts CHANGED
@@ -16,6 +16,7 @@ declare namespace mGBA {
16
16
  screenshotsPath: string;
17
17
  patchPath: string;
18
18
  autosave: string;
19
+ shaderPath: string;
19
20
  }
20
21
 
21
22
  export type coreCallbacks = {
@@ -101,6 +102,17 @@ declare namespace mGBA {
101
102
  */
102
103
  rewindBufferInterval?: number;
103
104
 
105
+ /**
106
+ * Controls the pixel density of the screen allowing for sharper texture rendering.
107
+ *
108
+ * Note: this is _not_ true high resolution upscaling yet, but does facilitate proper pixel scaling.
109
+ *
110
+ * Typical values: `1..16`
111
+ *
112
+ * Default: 1
113
+ */
114
+ highResolutionScale?: number;
115
+
104
116
  /**
105
117
  * Requested audio sample rate in Hz for the audio output.
106
118
  * The core will attempt to use this rate, actual output depends on
@@ -495,6 +507,23 @@ declare namespace mGBA {
495
507
  */
496
508
  setCoreSettings(coreSettings: coreSettings): void;
497
509
 
510
+ /**
511
+ * Returns a list of available shader paths in the in-memory file system.
512
+ */
513
+ listShaders(): string[];
514
+
515
+ /**
516
+ * Loads the shader from the specified path.
517
+ *
518
+ * @param shaderPath - Path of shader to load from the in-memory file system.
519
+ */
520
+ loadShader(shaderPath: string): void;
521
+
522
+ /**
523
+ * Unloads the currently active shader.
524
+ */
525
+ unloadShader(): void;
526
+
498
527
  // custom variables
499
528
  version: {
500
529
  projectName: string;
@@ -551,14 +580,16 @@ declare namespace mGBA {
551
580
  * This core uses threads, your app must be served with cross-origin isolation enabled
552
581
  * (`COOP: same-origin` + `COEP: require-corp`), otherwise it will not run correctly.
553
582
  *
554
- * @param options - Module options.
555
- * @param options.canvas - Canvas used for video output.
556
- * @returns The initialized emulator `Module`.
583
+ * @param options - All default emscripten Module options. See https://emscripten.org/docs/api_reference/module.html
584
+ * @param options.canvas - Extra type definition for the canvas used for video output.
585
+ * @returns The initialized mGBA emulator `Module`.
557
586
  */
558
587
  // eslint-disable-next-line import/no-default-export
559
- export default function mGBA(options: {
560
- canvas: HTMLCanvasElement;
561
- }): Promise<mGBAEmulator>;
588
+ export default function mGBA(
589
+ options: Partial<EmscriptenModule> & {
590
+ canvas: HTMLCanvasElement;
591
+ },
592
+ ): Promise<mGBAEmulator>;
562
593
  }
563
594
 
564
595
  export = mGBA;