Skip to content

pixelDensity() not working in exported Windows applications #5414

@andrewtaylorjohnson

Description

@andrewtaylorjohnson

Description

When exporting a sketch to an application, displayDensity() no longer returns the correct value. This is happening on my high DPI monitor using Windows 10. Also, hardcoding the pixel density to 2, pixelDensity(2), has no effect whatsoever. This is not an issue when I run the sketch from the Processing editor.

Expected Behavior

As I am using a high DPI monitor, I expect the displayDensity() function to return a value of 2. I also expect pixelDensity(2) to set the pixel density to 2.

Current Behavior

displayDensity() returns a value of 1, and pixelDensity(2) has no effect.

Steps to Reproduce

  1. Within the setup function, use the following code snippet: pixelDensity(2);
  2. Export the application and run.

Your Environment

  • Processing version: 3.3.6
  • Operating System and OS version: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions