Skip to content

Contributing

Aurumaker72 edited this page Feb 1, 2025 · 18 revisions

Compiling

Open the solution with your IDE of choice and build the solution.

Recommended IDEs are:

Additional context - Rider

It's recommended to disable "Use external console" (Run > Modify Run Configuration...), as it breaks spdlog's text coloring and reduces both startup and runtime performance.

Additionally, Rider users should disable ReSharper Build if it doesn't affect their workflow, as it introduces a large amount of latency to the build start.

grafik

Commit Style

Commits should, if possible, be reduced to individual work units and not contain multiple unrelated changes, barring situations where, for example, API changes require updating callsites.

The commits should be formatted as follows:

[Scope]/[Kind]: [Description]

Module

Scope can describe either a general scope, or, in most cases, the module affected by the commit, usually by filename (e.g.: view/capture/EncodingManager.cpp -> EncodingManager)

Special scopes:

  • Chore (maintenance that has to be done at regular intervals, such as README or Copyright header updates)
  • Doc (documentation)
  • Build (build system or compiler option changes)
  • CI (changes to CI workflows)
  • Arch (architectural changes)

Kind

Kind loosely specifies the groups affected by the change. Can be:

  • Feat (a new feature or noteworthy change in functionality of an existing feature).
  • Chg (a change relevant to the user)
  • Fix (a bugfix)
  • Dev (internal change with little to no effect on users)

Example commits:

AVIEncoder/Fix: Encoder crashing on frame 32

ConfigDialog/Feat: Reset settings button

Copyright Header

Every non-library file must contain the following header:

/*
 * Copyright (c) 2025, Mupen64 maintainers, contributors, and original authors (Hacktarux, ShadowPrince, linker).
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

Program Structure

The project is divided into 3 layers: Shared, Core, and View.

The layered approach should be respected in new commits, such that no architectural violations (such as directly accessing UI elements in the emulation core) are introduced.

Core

The core layer contains the emulation core data and code, with access to the shared layer, STL, and project libraries.

This layer must be driven by the view layer, and is allowed to call into contract functions defined in the shared layer and implemented in the view layer.

View

The view layer contains references to the other layers, implements the required contracts, and drives the view layer.

Platform-specific references (e.g.: Windows.h) are only permitted in the view layer.

Util

Scripts and various other utilities which aren't directly a part of the emulator.

Clone this wiki locally