RobLoach / RobLoach/raylib-libretro

Implement RETRO_ENVIRONMENT_GET_DEVICE_POWER

Open Beginner friendly
#110 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
38
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Fill a retro_device_power struct so cores can query battery state and pause/throttle on low power.

Stub location: include/raylib-libretro.hRETRO_ENVIRONMENT_GET_DEVICE_POWER case.

Initial implementation can return RETRO_POWERSTATE_PLUGGED_IN with percent / seconds unknown;

Reference: vendor/libretro-common/include/libretro.hstruct retro_device_power.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in include/raylib-libretro.h at the RETRO_ENVIRONMENT_GET_DEVICE_POWER case, then read struct retro_device_power in vendor/libretro-common/include/libretro.h. Fill the structure using the documented initial plugged-in state, leaving percent and seconds unknown, and verify that the case returns the expected power information.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.